Warning: Permanently added '44.199.246.67' (ED25519) to the list of known hosts. You can reproduce this build on your computer by running: sudo dnf install copr-rpmbuild /usr/bin/copr-rpmbuild --verbose --drop-resultdir --task-url https://copr.fedorainfracloud.org/backend/get-build-task/8410303-fedora-rawhide-x86_64 --chroot fedora-rawhide-x86_64 Version: 1.2 PID: 10221 Logging PID: 10222 Task: {'allow_user_ssh': False, 'appstream': False, 'background': True, 'build_id': 8410303, 'buildroot_pkgs': [], 'chroot': 'fedora-rawhide-x86_64', 'enable_net': False, 'fedora_review': False, 'git_hash': '4e9ca529dbaaa7f1f1f85b5fa4c1d81213ff8cb4', 'git_repo': 'https://copr-dist-git.fedorainfracloud.org/git/lbalhar/python-jupyter-events_rawhide/python-jupyter-server', 'isolation': 'default', 'memory_reqs': 2048, 'package_name': 'python-jupyter-server', 'package_version': '2.14.2-2', 'project_dirname': 'python-jupyter-events_rawhide', 'project_name': 'python-jupyter-events_rawhide', 'project_owner': 'lbalhar', 'repo_priority': None, 'repos': [{'baseurl': 'https://download.copr.fedorainfracloud.org/results/lbalhar/python-jupyter-events_rawhide/fedora-rawhide-x86_64/', 'id': 'copr_base', 'name': 'Copr repository', 'priority': None}], 'sandbox': 'lbalhar/python-jupyter-events_rawhide--lbalhar', 'source_json': {}, 'source_type': None, 'ssh_public_keys': None, 'storage': 0, 'submitter': 'lbalhar', 'tags': [], 'task_id': '8410303-fedora-rawhide-x86_64', 'timeout': 18000, 'uses_devel_repo': False, 'with_opts': [], 'without_opts': []} Running: git clone https://copr-dist-git.fedorainfracloud.org/git/lbalhar/python-jupyter-events_rawhide/python-jupyter-server /var/lib/copr-rpmbuild/workspace/workdir-c563ycor/python-jupyter-server --depth 500 --no-single-branch --recursive cmd: ['git', 'clone', 'https://copr-dist-git.fedorainfracloud.org/git/lbalhar/python-jupyter-events_rawhide/python-jupyter-server', '/var/lib/copr-rpmbuild/workspace/workdir-c563ycor/python-jupyter-server', '--depth', '500', '--no-single-branch', '--recursive'] cwd: . rc: 0 stdout: stderr: Cloning into '/var/lib/copr-rpmbuild/workspace/workdir-c563ycor/python-jupyter-server'... Running: git checkout 4e9ca529dbaaa7f1f1f85b5fa4c1d81213ff8cb4 -- cmd: ['git', 'checkout', '4e9ca529dbaaa7f1f1f85b5fa4c1d81213ff8cb4', '--'] cwd: /var/lib/copr-rpmbuild/workspace/workdir-c563ycor/python-jupyter-server rc: 0 stdout: stderr: Note: switching to '4e9ca529dbaaa7f1f1f85b5fa4c1d81213ff8cb4'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example: git switch -c Or undo this operation with: git switch - Turn off this advice by setting config variable advice.detachedHead to false HEAD is now at 4e9ca52 automatic import of python-jupyter-server Running: dist-git-client sources cmd: ['dist-git-client', 'sources'] cwd: /var/lib/copr-rpmbuild/workspace/workdir-c563ycor/python-jupyter-server rc: 0 stdout: stderr: INFO: Reading stdout from command: git rev-parse --abbrev-ref HEAD INFO: Reading stdout from command: git rev-parse HEAD INFO: Reading sources specification file: sources INFO: Downloading jupyter_server-2.14.2.tar.gz INFO: Reading stdout from command: curl --help all INFO: Calling: curl -H Pragma: -o jupyter_server-2.14.2.tar.gz --location --connect-timeout 60 --retry 3 --retry-delay 10 --remote-time --show-error --fail --retry-all-errors https://copr-dist-git.fedorainfracloud.org/repo/pkgs/lbalhar/python-jupyter-events_rawhide/python-jupyter-server/jupyter_server-2.14.2.tar.gz/md5/055f28ccdba76320b5b694c28727898e/jupyter_server-2.14.2.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 703k 100 703k 0 0 49.6M 0 --:--:-- --:--:-- --:--:-- 52.8M INFO: Reading stdout from command: md5sum jupyter_server-2.14.2.tar.gz /usr/bin/tail: /var/lib/copr-rpmbuild/main.log: file truncated Running (timeout=18000): unbuffer mock --spec /var/lib/copr-rpmbuild/workspace/workdir-c563ycor/python-jupyter-server/python-jupyter-server.spec --sources /var/lib/copr-rpmbuild/workspace/workdir-c563ycor/python-jupyter-server --resultdir /var/lib/copr-rpmbuild/results --uniqueext 1734518440.388095 -r /var/lib/copr-rpmbuild/results/configs/child.cfg INFO: mock.py version 5.9 starting (python version = 3.13.0, NVR = mock-5.9-1.fc41), args: /usr/libexec/mock/mock --spec /var/lib/copr-rpmbuild/workspace/workdir-c563ycor/python-jupyter-server/python-jupyter-server.spec --sources /var/lib/copr-rpmbuild/workspace/workdir-c563ycor/python-jupyter-server --resultdir /var/lib/copr-rpmbuild/results --uniqueext 1734518440.388095 -r /var/lib/copr-rpmbuild/results/configs/child.cfg Start(bootstrap): init plugins INFO: tmpfs initialized INFO: selinux enabled INFO: chroot_scan: initialized INFO: compress_logs: initialized Finish(bootstrap): init plugins Start: init plugins INFO: tmpfs initialized INFO: selinux enabled INFO: chroot_scan: initialized INFO: compress_logs: initialized Finish: init plugins INFO: Signal handler active Start: run INFO: Start(/var/lib/copr-rpmbuild/workspace/workdir-c563ycor/python-jupyter-server/python-jupyter-server.spec) Config(fedora-rawhide-x86_64) Start: clean chroot Finish: clean chroot Mock Version: 5.9 INFO: Mock Version: 5.9 Start(bootstrap): chroot init INFO: mounting tmpfs at /var/lib/mock/fedora-rawhide-x86_64-bootstrap-1734518440.388095/root. INFO: calling preinit hooks INFO: enabled root cache INFO: enabled package manager cache Start(bootstrap): cleaning package manager metadata Finish(bootstrap): cleaning package manager metadata INFO: Guessed host environment type: unknown INFO: Using bootstrap image: registry.fedoraproject.org/fedora:rawhide INFO: Pulling image: registry.fedoraproject.org/fedora:rawhide INFO: Copy content of container registry.fedoraproject.org/fedora:rawhide to /var/lib/mock/fedora-rawhide-x86_64-bootstrap-1734518440.388095/root INFO: Checking that registry.fedoraproject.org/fedora:rawhide image matches host's architecture INFO: mounting registry.fedoraproject.org/fedora:rawhide with podman image mount INFO: image registry.fedoraproject.org/fedora:rawhide as /var/lib/containers/storage/overlay/20264d84b038c0676961d488450f3d7ec1848d7a526bdc9503d1c1a787d88a3c/merged INFO: umounting image registry.fedoraproject.org/fedora:rawhide (/var/lib/containers/storage/overlay/20264d84b038c0676961d488450f3d7ec1848d7a526bdc9503d1c1a787d88a3c/merged) with podman image umount INFO: Package manager dnf5 detected and used (fallback) INFO: Not updating bootstrap chroot, bootstrap_image_ready=True Start(bootstrap): creating root cache Finish(bootstrap): creating root cache Finish(bootstrap): chroot init Start: chroot init INFO: mounting tmpfs at /var/lib/mock/fedora-rawhide-x86_64-1734518440.388095/root. INFO: calling preinit hooks INFO: enabled root cache INFO: enabled package manager cache Start: cleaning package manager metadata Finish: cleaning package manager metadata INFO: enabled HW Info plugin INFO: Package manager dnf5 detected and used (direct choice) INFO: Buildroot is handled by package management downloaded with a bootstrap image: rpm-4.20.0-1.fc42.x86_64 rpm-sequoia-1.7.0-3.fc42.x86_64 dnf5-5.2.8.1-2.fc42.x86_64 dnf5-plugins-5.2.8.1-2.fc42.x86_64 Start: installing minimal buildroot with dnf5 Updating and loading repositories: fedora 100% | 28.0 MiB/s | 21.9 MiB | 00m01s Copr repository 100% | 36.3 KiB/s | 2.6 KiB | 00m00s Repositories loaded. Package Arch Version Repository Size Installing group/module packages: bash x86_64 5.2.37-1.fc42 fedora 8.2 MiB bzip2 x86_64 1.0.8-19.fc41 fedora 95.7 KiB coreutils x86_64 9.5-11.fc42 fedora 5.4 MiB cpio x86_64 2.15-2.fc41 fedora 1.1 MiB diffutils x86_64 3.10-8.fc41 fedora 1.6 MiB fedora-release-common noarch 42-0.11 fedora 19.8 KiB findutils x86_64 1:4.10.0-4.fc41 fedora 1.8 MiB gawk x86_64 5.3.0-4.fc41 fedora 1.7 MiB glibc-minimal-langpack x86_64 2.40.9000-24.fc42 fedora 0.0 B grep x86_64 3.11-9.fc41 fedora 1.0 MiB gzip x86_64 1.13-2.fc41 fedora 389.0 KiB info x86_64 7.1.1-2.fc42 fedora 361.8 KiB patch x86_64 2.7.6-25.fc41 fedora 266.7 KiB redhat-rpm-config noarch 296-1.fc42 fedora 186.6 KiB rpm-build x86_64 4.20.0-1.fc42 fedora 194.3 KiB sed x86_64 4.9-3.fc41 fedora 861.5 KiB shadow-utils x86_64 2:4.17.0~rc1-1.fc42 fedora 4.1 MiB tar x86_64 2:1.35-4.fc41 fedora 2.9 MiB unzip x86_64 6.0-65.fc42 fedora 398.2 KiB util-linux x86_64 2.40.2-8.fc42 fedora 3.7 MiB which x86_64 2.21-42.fc41 fedora 80.2 KiB xz x86_64 1:5.6.3-2.fc42 fedora 1.2 MiB Installing dependencies: add-determinism x86_64 0.4.3-1.fc42 fedora 2.4 MiB alternatives x86_64 1.30-1.fc41 fedora 66.3 KiB ansible-srpm-macros noarch 1-16.fc41 fedora 35.7 KiB audit-libs x86_64 4.0.2-1.fc41 fedora 331.3 KiB authselect x86_64 1.5.0-8.fc42 fedora 157.5 KiB authselect-libs x86_64 1.5.0-8.fc42 fedora 822.2 KiB basesystem noarch 11-21.fc41 fedora 0.0 B binutils x86_64 2.43.50-9.fc42 fedora 25.8 MiB build-reproducibility-srpm-macros noarch 0.4.3-1.fc42 fedora 735.0 B bzip2-libs x86_64 1.0.8-19.fc41 fedora 80.7 KiB ca-certificates noarch 2024.2.69_v8.0.401-3.fc42 fedora 2.6 MiB coreutils-common x86_64 9.5-11.fc42 fedora 11.2 MiB cracklib x86_64 2.9.11-6.fc41 fedora 238.9 KiB crypto-policies noarch 20241128-1.gitbb7b0b0.fc42 fedora 137.3 KiB curl x86_64 8.11.1-2.fc42 fedora 452.0 KiB cyrus-sasl-lib x86_64 2.1.28-27.fc41 fedora 2.3 MiB debugedit x86_64 5.1-2.fc42 fedora 200.3 KiB dwz x86_64 0.15-8.fc42 fedora 299.2 KiB ed x86_64 1.20.2-2.fc41 fedora 146.9 KiB efi-srpm-macros noarch 5-13.fc42 fedora 40.2 KiB elfutils x86_64 0.192-7.fc42 fedora 2.6 MiB elfutils-debuginfod-client x86_64 0.192-7.fc42 fedora 81.4 KiB elfutils-default-yama-scope noarch 0.192-7.fc42 fedora 1.8 KiB elfutils-libelf x86_64 0.192-7.fc42 fedora 1.2 MiB elfutils-libs x86_64 0.192-7.fc42 fedora 662.9 KiB fedora-gpg-keys noarch 42-0.3 fedora 126.4 KiB fedora-release noarch 42-0.11 fedora 0.0 B fedora-release-identity-basic noarch 42-0.11 fedora 719.0 B fedora-repos noarch 42-0.3 fedora 4.9 KiB fedora-repos-rawhide noarch 42-0.3 fedora 2.2 KiB file x86_64 5.45-8.fc42 fedora 103.7 KiB file-libs x86_64 5.45-8.fc42 fedora 9.9 MiB filesystem x86_64 3.18-29.fc42 fedora 106.0 B fonts-srpm-macros noarch 1:2.0.5-17.fc41 fedora 55.8 KiB forge-srpm-macros noarch 0.4.0-1.fc42 fedora 38.9 KiB fpc-srpm-macros noarch 1.3-13.fc41 fedora 144.0 B gdb-minimal x86_64 15.2-4.fc42 fedora 12.7 MiB gdbm x86_64 1:1.23-7.fc41 fedora 460.9 KiB gdbm-libs x86_64 1:1.23-7.fc41 fedora 121.9 KiB ghc-srpm-macros noarch 1.9.2-1.fc42 fedora 779.0 B glibc x86_64 2.40.9000-24.fc42 fedora 6.7 MiB glibc-common x86_64 2.40.9000-24.fc42 fedora 1.0 MiB glibc-gconv-extra x86_64 2.40.9000-24.fc42 fedora 8.0 MiB gmp x86_64 1:6.3.0-2.fc41 fedora 811.4 KiB gnat-srpm-macros noarch 6-6.fc41 fedora 1.0 KiB go-srpm-macros noarch 3.6.0-5.fc42 fedora 60.8 KiB jansson x86_64 2.14-1.fc42 fedora 93.1 KiB json-c x86_64 0.18-1.fc42 fedora 83.3 KiB kernel-srpm-macros noarch 1.0-24.fc41 fedora 1.9 KiB keyutils-libs x86_64 1.6.3-4.fc41 fedora 54.4 KiB krb5-libs x86_64 1.21.3-3.fc42 fedora 2.3 MiB libacl x86_64 2.3.2-2.fc41 fedora 40.0 KiB libarchive x86_64 3.7.7-1.fc42 fedora 932.3 KiB libattr x86_64 2.5.2-4.fc41 fedora 28.5 KiB libblkid x86_64 2.40.2-8.fc42 fedora 262.5 KiB libbrotli x86_64 1.1.0-5.fc41 fedora 837.6 KiB libcap x86_64 2.71-1.fc42 fedora 210.8 KiB libcap-ng x86_64 0.8.5-3.fc41 fedora 69.2 KiB libcom_err x86_64 1.47.1-6.fc42 fedora 67.2 KiB libcurl x86_64 8.11.1-2.fc42 fedora 817.3 KiB libeconf x86_64 0.7.5-1.fc42 fedora 66.7 KiB libevent x86_64 2.1.12-14.fc41 fedora 895.7 KiB libfdisk x86_64 2.40.2-8.fc42 fedora 362.9 KiB libffi x86_64 3.4.6-3.fc42 fedora 86.4 KiB libgcc x86_64 14.2.1-6.fc42 fedora 270.6 KiB libgomp x86_64 14.2.1-6.fc42 fedora 519.8 KiB libidn2 x86_64 2.3.7-2.fc41 fedora 329.1 KiB libmount x86_64 2.40.2-8.fc42 fedora 355.8 KiB libnghttp2 x86_64 1.64.0-1.fc42 fedora 174.5 KiB libnsl2 x86_64 2.0.1-2.fc41 fedora 57.9 KiB libpkgconf x86_64 2.3.0-1.fc42 fedora 78.2 KiB libpsl x86_64 0.21.5-4.fc41 fedora 80.5 KiB libpwquality x86_64 1.4.5-11.fc41 fedora 417.8 KiB libselinux x86_64 3.8-0.rc1.2.fc42 fedora 191.6 KiB libsemanage x86_64 3.8-0.rc1.1.fc42 fedora 305.3 KiB libsepol x86_64 3.8-0.rc1.1.fc42 fedora 822.0 KiB libsmartcols x86_64 2.40.2-8.fc42 fedora 180.4 KiB libssh x86_64 0.11.1-1.fc42 fedora 569.6 KiB libssh-config noarch 0.11.1-1.fc42 fedora 277.0 B libstdc++ x86_64 14.2.1-6.fc42 fedora 2.8 MiB libtasn1 x86_64 4.19.0-9.fc41 fedora 175.7 KiB libtirpc x86_64 1.3.6-1.fc42 fedora 205.5 KiB libtool-ltdl x86_64 2.5.4-1.fc42 fedora 68.1 KiB libunistring x86_64 1.1-8.fc41 fedora 1.7 MiB libuuid x86_64 2.40.2-8.fc42 fedora 41.4 KiB libverto x86_64 0.3.2-9.fc41 fedora 29.5 KiB libxcrypt x86_64 4.4.36-11.fc42 fedora 271.4 KiB libxml2 x86_64 2.12.8-2.fc41 fedora 1.7 MiB libzstd x86_64 1.5.6-2.fc41 fedora 795.9 KiB lua-libs x86_64 5.4.7-1.fc42 fedora 285.0 KiB lua-srpm-macros noarch 1-14.fc41 fedora 1.3 KiB lz4-libs x86_64 1.10.0-1.fc41 fedora 145.5 KiB mpfr x86_64 4.2.1-5.fc41 fedora 832.1 KiB ncurses-base noarch 6.5-2.20240629.fc41 fedora 326.3 KiB ncurses-libs x86_64 6.5-2.20240629.fc41 fedora 975.2 KiB ocaml-srpm-macros noarch 10-3.fc41 fedora 1.9 KiB openblas-srpm-macros noarch 2-18.fc41 fedora 112.0 B openldap x86_64 2.6.8-6.fc42 fedora 647.4 KiB openssl-libs x86_64 1:3.2.2-8.fc42 fedora 7.8 MiB p11-kit x86_64 0.25.5-4.fc42 fedora 2.2 MiB p11-kit-trust x86_64 0.25.5-4.fc42 fedora 403.8 KiB package-notes-srpm-macros noarch 0.5-12.fc41 fedora 1.6 KiB pam x86_64 1.7.0-3.fc42 fedora 1.8 MiB pam-libs x86_64 1.7.0-3.fc42 fedora 139.4 KiB pcre2 x86_64 10.44-1.fc41.1 fedora 653.5 KiB pcre2-syntax noarch 10.44-1.fc41.1 fedora 251.6 KiB perl-srpm-macros noarch 1-56.fc41 fedora 861.0 B pkgconf x86_64 2.3.0-1.fc42 fedora 88.6 KiB pkgconf-m4 noarch 2.3.0-1.fc42 fedora 14.4 KiB pkgconf-pkg-config x86_64 2.3.0-1.fc42 fedora 989.0 B popt x86_64 1.19-7.fc41 fedora 136.9 KiB publicsuffix-list-dafsa noarch 20240107-4.fc41 fedora 67.5 KiB pyproject-srpm-macros noarch 1.16.3-1.fc42 fedora 1.9 KiB python-srpm-macros noarch 3.13-3.fc41 fedora 51.0 KiB qt5-srpm-macros noarch 5.15.15-1.fc42 fedora 500.0 B qt6-srpm-macros noarch 6.8.1-4.fc42 fedora 456.0 B readline x86_64 8.2-11.fc42 fedora 493.1 KiB rpm x86_64 4.20.0-1.fc42 fedora 3.1 MiB rpm-build-libs x86_64 4.20.0-1.fc42 fedora 206.7 KiB rpm-libs x86_64 4.20.0-1.fc42 fedora 726.1 KiB rpm-sequoia x86_64 1.7.0-3.fc42 fedora 2.3 MiB rust-srpm-macros noarch 26.3-3.fc42 fedora 4.8 KiB setup noarch 2.15.0-5.fc41 fedora 720.7 KiB sqlite-libs x86_64 3.47.2-1.fc42 fedora 1.4 MiB systemd-libs x86_64 257-1.fc42 fedora 2.2 MiB util-linux-core x86_64 2.40.2-8.fc42 fedora 1.5 MiB xxhash-libs x86_64 0.8.2-4.fc42 fedora 88.4 KiB xz-libs x86_64 1:5.6.3-2.fc42 fedora 218.4 KiB zig-srpm-macros noarch 1-3.fc41 fedora 1.1 KiB zip x86_64 3.0-42.fc42 fedora 695.9 KiB zlib-ng-compat x86_64 2.2.2-1.fc42 fedora 134.0 KiB zstd x86_64 1.5.6-2.fc41 fedora 1.7 MiB Installing groups: Buildsystem building group Transaction Summary: Installing: 154 packages Total size of inbound packages is 52 MiB. Need to download 52 MiB. After this operation, 179 MiB extra will be used (install 179 MiB, remove 0 B). [ 1/154] bzip2-0:1.0.8-19.fc41.x86_64 100% | 4.3 MiB/s | 52.5 KiB | 00m00s [ 2/154] bash-0:5.2.37-1.fc42.x86_64 100% | 95.1 MiB/s | 1.8 MiB | 00m00s [ 3/154] cpio-0:2.15-2.fc41.x86_64 100% | 40.7 MiB/s | 291.8 KiB | 00m00s [ 4/154] coreutils-0:9.5-11.fc42.x86_6 100% | 49.7 MiB/s | 1.1 MiB | 00m00s [ 5/154] diffutils-0:3.10-8.fc41.x86_6 100% | 99.0 MiB/s | 405.4 KiB | 00m00s [ 6/154] findutils-1:4.10.0-4.fc41.x86 100% | 133.9 MiB/s | 548.6 KiB | 00m00s [ 7/154] glibc-minimal-langpack-0:2.40 100% | 39.7 MiB/s | 122.0 KiB | 00m00s [ 8/154] gzip-0:1.13-2.fc41.x86_64 100% | 55.4 MiB/s | 170.2 KiB | 00m00s [ 9/154] info-0:7.1.1-2.fc42.x86_64 100% | 89.4 MiB/s | 183.2 KiB | 00m00s [ 10/154] patch-0:2.7.6-25.fc41.x86_64 100% | 63.9 MiB/s | 131.0 KiB | 00m00s [ 11/154] redhat-rpm-config-0:296-1.fc4 100% | 13.4 MiB/s | 82.4 KiB | 00m00s [ 12/154] fedora-release-common-0:42-0. 100% | 1.0 MiB/s | 23.9 KiB | 00m00s [ 13/154] grep-0:3.11-9.fc41.x86_64 100% | 17.2 MiB/s | 299.8 KiB | 00m00s [ 14/154] rpm-build-0:4.20.0-1.fc42.x86 100% | 40.4 MiB/s | 82.7 KiB | 00m00s [ 15/154] sed-0:4.9-3.fc41.x86_64 100% | 77.6 MiB/s | 317.7 KiB | 00m00s [ 16/154] tar-2:1.35-4.fc41.x86_64 100% | 120.1 MiB/s | 860.7 KiB | 00m00s [ 17/154] shadow-utils-2:4.17.0~rc1-1.f 100% | 128.0 MiB/s | 1.3 MiB | 00m00s [ 18/154] unzip-0:6.0-65.fc42.x86_64 100% | 25.7 MiB/s | 184.5 KiB | 00m00s [ 19/154] which-0:2.21-42.fc41.x86_64 100% | 20.3 MiB/s | 41.6 KiB | 00m00s [ 20/154] xz-1:5.6.3-2.fc42.x86_64 100% | 92.8 MiB/s | 475.4 KiB | 00m00s [ 21/154] gawk-0:5.3.0-4.fc41.x86_64 100% | 107.1 MiB/s | 1.1 MiB | 00m00s [ 22/154] util-linux-0:2.40.2-8.fc42.x8 100% | 96.9 MiB/s | 1.2 MiB | 00m00s [ 23/154] filesystem-0:3.18-29.fc42.x86 100% | 90.6 MiB/s | 1.1 MiB | 00m00s [ 24/154] glibc-0:2.40.9000-24.fc42.x86 100% | 168.5 MiB/s | 2.2 MiB | 00m00s [ 25/154] bzip2-libs-0:1.0.8-19.fc41.x8 100% | 6.7 MiB/s | 41.1 KiB | 00m00s [ 26/154] ncurses-libs-0:6.5-2.20240629 100% | 27.2 MiB/s | 334.0 KiB | 00m00s [ 27/154] libacl-0:2.3.2-2.fc41.x86_64 100% | 23.9 MiB/s | 24.5 KiB | 00m00s [ 28/154] gmp-1:6.3.0-2.fc41.x86_64 100% | 103.5 MiB/s | 318.0 KiB | 00m00s [ 29/154] libattr-0:2.5.2-4.fc41.x86_64 100% | 5.9 MiB/s | 18.2 KiB | 00m00s [ 30/154] libcap-0:2.71-1.fc42.x86_64 100% | 28.1 MiB/s | 86.4 KiB | 00m00s [ 31/154] coreutils-common-0:9.5-11.fc4 100% | 192.9 MiB/s | 2.1 MiB | 00m00s [ 32/154] libselinux-0:3.8-0.rc1.2.fc42 100% | 17.7 MiB/s | 90.7 KiB | 00m00s [ 33/154] openssl-libs-1:3.2.2-8.fc42.x 100% | 177.7 MiB/s | 2.3 MiB | 00m00s [ 34/154] fedora-repos-0:42-0.3.noarch 100% | 1.1 MiB/s | 9.2 KiB | 00m00s [ 35/154] systemd-libs-0:257-1.fc42.x86 100% | 75.2 MiB/s | 770.3 KiB | 00m00s [ 36/154] pcre2-0:10.44-1.fc41.1.x86_64 100% | 59.4 MiB/s | 243.1 KiB | 00m00s [ 37/154] glibc-common-0:2.40.9000-24.f 100% | 77.3 MiB/s | 396.0 KiB | 00m00s [ 38/154] ed-0:1.20.2-2.fc41.x86_64 100% | 20.0 MiB/s | 81.8 KiB | 00m00s [ 39/154] build-reproducibility-srpm-ma 100% | 10.9 MiB/s | 11.2 KiB | 00m00s [ 40/154] ansible-srpm-macros-0:1-16.fc 100% | 10.1 MiB/s | 20.8 KiB | 00m00s [ 41/154] dwz-0:0.15-8.fc42.x86_64 100% | 67.9 MiB/s | 139.1 KiB | 00m00s [ 42/154] efi-srpm-macros-0:5-13.fc42.n 100% | 21.9 MiB/s | 22.5 KiB | 00m00s [ 43/154] file-0:5.45-8.fc42.x86_64 100% | 47.5 MiB/s | 48.6 KiB | 00m00s [ 44/154] fonts-srpm-macros-1:2.0.5-17. 100% | 13.2 MiB/s | 27.0 KiB | 00m00s [ 45/154] forge-srpm-macros-0:0.4.0-1.f 100% | 9.6 MiB/s | 19.8 KiB | 00m00s [ 46/154] ghc-srpm-macros-0:1.9.2-1.fc4 100% | 4.5 MiB/s | 9.1 KiB | 00m00s [ 47/154] fpc-srpm-macros-0:1.3-13.fc41 100% | 1.9 MiB/s | 8.0 KiB | 00m00s [ 48/154] gnat-srpm-macros-0:6-6.fc41.n 100% | 2.9 MiB/s | 9.0 KiB | 00m00s [ 49/154] go-srpm-macros-0:3.6.0-5.fc42 100% | 27.3 MiB/s | 28.0 KiB | 00m00s [ 50/154] kernel-srpm-macros-0:1.0-24.f 100% | 9.6 MiB/s | 9.9 KiB | 00m00s [ 51/154] lua-srpm-macros-0:1-14.fc41.n 100% | 8.7 MiB/s | 8.9 KiB | 00m00s [ 52/154] openblas-srpm-macros-0:2-18.f 100% | 7.5 MiB/s | 7.7 KiB | 00m00s [ 53/154] ocaml-srpm-macros-0:10-3.fc41 100% | 4.5 MiB/s | 9.2 KiB | 00m00s [ 54/154] package-notes-srpm-macros-0:0 100% | 4.8 MiB/s | 9.8 KiB | 00m00s [ 55/154] pyproject-srpm-macros-0:1.16. 100% | 13.5 MiB/s | 13.9 KiB | 00m00s [ 56/154] perl-srpm-macros-0:1-56.fc41. 100% | 4.2 MiB/s | 8.5 KiB | 00m00s [ 57/154] python-srpm-macros-0:3.13-3.f 100% | 11.6 MiB/s | 23.7 KiB | 00m00s [ 58/154] qt5-srpm-macros-0:5.15.15-1.f 100% | 4.3 MiB/s | 8.9 KiB | 00m00s [ 59/154] qt6-srpm-macros-0:6.8.1-4.fc4 100% | 4.5 MiB/s | 9.3 KiB | 00m00s [ 60/154] zig-srpm-macros-0:1-3.fc41.no 100% | 7.9 MiB/s | 8.1 KiB | 00m00s [ 61/154] rust-srpm-macros-0:26.3-3.fc4 100% | 5.9 MiB/s | 12.1 KiB | 00m00s [ 62/154] rpm-0:4.20.0-1.fc42.x86_64 100% | 133.6 MiB/s | 547.3 KiB | 00m00s [ 63/154] debugedit-0:5.1-2.fc42.x86_64 100% | 38.2 MiB/s | 78.2 KiB | 00m00s [ 64/154] zip-0:3.0-42.fc42.x86_64 100% | 83.6 MiB/s | 256.7 KiB | 00m00s [ 65/154] elfutils-0:0.192-7.fc42.x86_6 100% | 123.2 MiB/s | 504.7 KiB | 00m00s [ 66/154] elfutils-libelf-0:0.192-7.fc4 100% | 66.6 MiB/s | 204.6 KiB | 00m00s [ 67/154] libarchive-0:3.7.7-1.fc42.x86 100% | 101.1 MiB/s | 413.9 KiB | 00m00s [ 68/154] popt-0:1.19-7.fc41.x86_64 100% | 21.5 MiB/s | 65.9 KiB | 00m00s [ 69/154] readline-0:8.2-11.fc42.x86_64 100% | 69.5 MiB/s | 213.4 KiB | 00m00s [ 70/154] rpm-build-libs-0:4.20.0-1.fc4 100% | 32.1 MiB/s | 98.7 KiB | 00m00s [ 71/154] rpm-libs-0:4.20.0-1.fc42.x86_ 100% | 100.8 MiB/s | 309.5 KiB | 00m00s [ 72/154] zstd-0:1.5.6-2.fc41.x86_64 100% | 117.6 MiB/s | 481.5 KiB | 00m00s [ 73/154] audit-libs-0:4.0.2-1.fc41.x86 100% | 41.1 MiB/s | 126.2 KiB | 00m00s [ 74/154] libeconf-0:0.7.5-1.fc42.x86_6 100% | 32.3 MiB/s | 33.1 KiB | 00m00s [ 75/154] pam-libs-0:1.7.0-3.fc42.x86_6 100% | 28.3 MiB/s | 58.0 KiB | 00m00s [ 76/154] libsemanage-0:3.8-0.rc1.1.fc4 100% | 37.7 MiB/s | 115.9 KiB | 00m00s [ 77/154] libxcrypt-0:4.4.36-11.fc42.x8 100% | 38.4 MiB/s | 118.1 KiB | 00m00s [ 78/154] setup-0:2.15.0-5.fc41.noarch 100% | 50.3 MiB/s | 154.4 KiB | 00m00s [ 79/154] xz-libs-1:5.6.3-2.fc42.x86_64 100% | 36.4 MiB/s | 111.9 KiB | 00m00s [ 80/154] mpfr-0:4.2.1-5.fc41.x86_64 100% | 84.5 MiB/s | 346.3 KiB | 00m00s [ 81/154] libcap-ng-0:0.8.5-3.fc41.x86_ 100% | 15.9 MiB/s | 32.6 KiB | 00m00s [ 82/154] libblkid-0:2.40.2-8.fc42.x86_ 100% | 40.7 MiB/s | 125.0 KiB | 00m00s [ 83/154] libfdisk-0:2.40.2-8.fc42.x86_ 100% | 52.0 MiB/s | 159.6 KiB | 00m00s [ 84/154] libmount-0:2.40.2-8.fc42.x86_ 100% | 76.2 MiB/s | 156.1 KiB | 00m00s [ 85/154] libsmartcols-0:2.40.2-8.fc42. 100% | 41.0 MiB/s | 83.9 KiB | 00m00s [ 86/154] libuuid-0:2.40.2-8.fc42.x86_6 100% | 28.3 MiB/s | 29.0 KiB | 00m00s [ 87/154] zlib-ng-compat-0:2.2.2-1.fc42 100% | 37.6 MiB/s | 76.9 KiB | 00m00s [ 88/154] util-linux-core-0:2.40.2-8.fc 100% | 87.5 MiB/s | 537.3 KiB | 00m00s [ 89/154] glibc-gconv-extra-0:2.40.9000 100% | 188.8 MiB/s | 1.5 MiB | 00m00s [ 90/154] basesystem-0:11-21.fc41.noarc 100% | 1.2 MiB/s | 7.4 KiB | 00m00s [ 91/154] libgcc-0:14.2.1-6.fc42.x86_64 100% | 44.0 MiB/s | 135.2 KiB | 00m00s [ 92/154] ncurses-base-0:6.5-2.20240629 100% | 43.1 MiB/s | 88.4 KiB | 00m00s [ 93/154] libsepol-0:3.8-0.rc1.1.fc42.x 100% | 112.5 MiB/s | 345.7 KiB | 00m00s [ 94/154] ca-certificates-0:2024.2.69_v 100% | 153.7 MiB/s | 944.5 KiB | 00m00s [ 95/154] crypto-policies-0:20241128-1. 100% | 19.2 MiB/s | 98.4 KiB | 00m00s [ 96/154] fedora-gpg-keys-0:42-0.3.noar 100% | 32.6 MiB/s | 133.6 KiB | 00m00s [ 97/154] fedora-repos-rawhide-0:42-0.3 100% | 8.6 MiB/s | 8.8 KiB | 00m00s [ 98/154] pcre2-syntax-0:10.44-1.fc41.1 100% | 36.6 MiB/s | 149.9 KiB | 00m00s [ 99/154] add-determinism-0:0.4.3-1.fc4 100% | 176.6 MiB/s | 904.4 KiB | 00m00s [100/154] file-libs-0:5.45-8.fc42.x86_6 100% | 124.3 MiB/s | 763.6 KiB | 00m00s [101/154] curl-0:8.11.1-2.fc42.x86_64 100% | 53.7 MiB/s | 220.2 KiB | 00m00s [102/154] elfutils-libs-0:0.192-7.fc42. 100% | 82.0 MiB/s | 251.9 KiB | 00m00s [103/154] elfutils-debuginfod-client-0: 100% | 21.4 MiB/s | 43.9 KiB | 00m00s [104/154] libzstd-0:1.5.6-2.fc41.x86_64 100% | 101.0 MiB/s | 310.3 KiB | 00m00s [105/154] libstdc++-0:14.2.1-6.fc42.x86 100% | 173.9 MiB/s | 890.1 KiB | 00m00s [106/154] libxml2-0:2.12.8-2.fc41.x86_6 100% | 111.9 MiB/s | 687.3 KiB | 00m00s [107/154] lz4-libs-0:1.10.0-1.fc41.x86_ 100% | 17.3 MiB/s | 70.7 KiB | 00m00s [108/154] libgomp-0:14.2.1-6.fc42.x86_6 100% | 87.1 MiB/s | 356.9 KiB | 00m00s [109/154] lua-libs-0:5.4.7-1.fc42.x86_6 100% | 32.2 MiB/s | 132.1 KiB | 00m00s [110/154] rpm-sequoia-0:1.7.0-3.fc42.x8 100% | 161.3 MiB/s | 826.0 KiB | 00m00s [111/154] sqlite-libs-0:3.47.2-1.fc42.x 100% | 136.7 MiB/s | 699.8 KiB | 00m00s [112/154] elfutils-default-yama-scope-0 100% | 4.1 MiB/s | 12.5 KiB | 00m00s [113/154] json-c-0:0.18-1.fc42.x86_64 100% | 14.5 MiB/s | 44.4 KiB | 00m00s [114/154] authselect-libs-0:1.5.0-8.fc4 100% | 53.2 MiB/s | 218.0 KiB | 00m00s [115/154] pam-0:1.7.0-3.fc42.x86_64 100% | 108.3 MiB/s | 554.3 KiB | 00m00s [116/154] authselect-0:1.5.0-8.fc42.x86 100% | 35.6 MiB/s | 145.8 KiB | 00m00s [117/154] gdbm-libs-1:1.23-7.fc41.x86_6 100% | 27.5 MiB/s | 56.3 KiB | 00m00s [118/154] libnsl2-0:2.0.1-2.fc41.x86_64 100% | 14.5 MiB/s | 29.6 KiB | 00m00s [119/154] libpwquality-0:1.4.5-11.fc41. 100% | 38.8 MiB/s | 119.1 KiB | 00m00s [120/154] libtirpc-0:1.3.6-1.fc42.x86_6 100% | 30.9 MiB/s | 94.9 KiB | 00m00s [121/154] cracklib-0:2.9.11-6.fc41.x86_ 100% | 30.0 MiB/s | 92.0 KiB | 00m00s [122/154] libcom_err-0:1.47.1-6.fc42.x8 100% | 13.0 MiB/s | 26.6 KiB | 00m00s [123/154] keyutils-libs-0:1.6.3-4.fc41. 100% | 15.5 MiB/s | 31.6 KiB | 00m00s [124/154] krb5-libs-0:1.21.3-3.fc42.x86 100% | 123.8 MiB/s | 760.4 KiB | 00m00s [125/154] libverto-0:0.3.2-9.fc41.x86_6 100% | 5.1 MiB/s | 20.7 KiB | 00m00s [126/154] alternatives-0:1.30-1.fc41.x8 100% | 20.7 MiB/s | 42.5 KiB | 00m00s [127/154] jansson-0:2.14-1.fc42.x86_64 100% | 22.1 MiB/s | 45.3 KiB | 00m00s [128/154] pkgconf-pkg-config-0:2.3.0-1. 100% | 4.9 MiB/s | 10.0 KiB | 00m00s [129/154] pkgconf-m4-0:2.3.0-1.fc42.noa 100% | 4.7 MiB/s | 14.3 KiB | 00m00s [130/154] pkgconf-0:2.3.0-1.fc42.x86_64 100% | 7.4 MiB/s | 45.2 KiB | 00m00s [131/154] libpkgconf-0:2.3.0-1.fc42.x86 100% | 6.3 MiB/s | 38.5 KiB | 00m00s [132/154] binutils-0:2.43.50-9.fc42.x86 100% | 231.3 MiB/s | 5.8 MiB | 00m00s [133/154] libffi-0:3.4.6-3.fc42.x86_64 100% | 4.3 MiB/s | 40.0 KiB | 00m00s [134/154] gdbm-1:1.23-7.fc41.x86_64 100% | 9.9 MiB/s | 151.8 KiB | 00m00s [135/154] p11-kit-0:0.25.5-4.fc42.x86_6 100% | 160.2 MiB/s | 492.0 KiB | 00m00s [136/154] libtasn1-0:4.19.0-9.fc41.x86_ 100% | 24.2 MiB/s | 74.2 KiB | 00m00s [137/154] p11-kit-trust-0:0.25.5-4.fc42 100% | 32.5 MiB/s | 133.2 KiB | 00m00s [138/154] fedora-release-0:42-0.11.noar 100% | 6.3 MiB/s | 13.0 KiB | 00m00s [139/154] xxhash-libs-0:0.8.2-4.fc42.x8 100% | 9.0 MiB/s | 36.8 KiB | 00m00s [140/154] fedora-release-identity-basic 100% | 3.4 MiB/s | 13.8 KiB | 00m00s [141/154] libcurl-0:8.11.1-2.fc42.x86_6 100% | 69.7 MiB/s | 356.7 KiB | 00m00s [142/154] gdb-minimal-0:15.2-4.fc42.x86 100% | 224.5 MiB/s | 4.0 MiB | 00m00s [143/154] libbrotli-0:1.1.0-5.fc41.x86_ 100% | 27.7 MiB/s | 340.5 KiB | 00m00s [144/154] libidn2-0:2.3.7-2.fc41.x86_64 100% | 14.5 MiB/s | 118.4 KiB | 00m00s [145/154] libnghttp2-0:1.64.0-1.fc42.x8 100% | 18.9 MiB/s | 77.4 KiB | 00m00s [146/154] libpsl-0:0.21.5-4.fc41.x86_64 100% | 12.5 MiB/s | 64.1 KiB | 00m00s [147/154] libssh-0:0.11.1-1.fc42.x86_64 100% | 45.3 MiB/s | 231.9 KiB | 00m00s [148/154] openldap-0:2.6.8-6.fc42.x86_6 100% | 79.2 MiB/s | 243.4 KiB | 00m00s [149/154] publicsuffix-list-dafsa-0:202 100% | 28.5 MiB/s | 58.3 KiB | 00m00s [150/154] libssh-config-0:0.11.1-1.fc42 100% | 4.6 MiB/s | 9.4 KiB | 00m00s [151/154] libunistring-0:1.1-8.fc41.x86 100% | 133.0 MiB/s | 544.8 KiB | 00m00s [152/154] libevent-0:2.1.12-14.fc41.x86 100% | 125.7 MiB/s | 257.5 KiB | 00m00s [153/154] libtool-ltdl-0:2.5.4-1.fc42.x 100% | 16.7 MiB/s | 34.2 KiB | 00m00s [154/154] cyrus-sasl-lib-0:2.1.28-27.fc 100% | 194.1 MiB/s | 794.9 KiB | 00m00s -------------------------------------------------------------------------------- [154/154] Total 100% | 96.6 MiB/s | 52.0 MiB | 00m01s Running transaction Importing OpenPGP key 0x105EF944: UserID : "Fedora (42) " Fingerprint: B0F4950458F69E1150C6C5EDC8AC4916105EF944 From : file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-42-primary The key was successfully imported. Importing OpenPGP key 0x105EF944: UserID : "Fedora (42) " Fingerprint: B0F4950458F69E1150C6C5EDC8AC4916105EF944 From : file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-42-primary The key was successfully imported. Importing OpenPGP key 0xE99D6AD1: UserID : "Fedora (41) " Fingerprint: 466CF2D8B60BC3057AA9453ED0622462E99D6AD1 From : file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-41-primary The key was successfully imported. Importing OpenPGP key 0x31645531: UserID : "Fedora (43) " Fingerprint: C6E7F081CF80E13146676E88829B606631645531 From : file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-43-primary The key was successfully imported. [ 1/156] Verify package files 100% | 827.0 B/s | 154.0 B | 00m00s [ 2/156] Prepare transaction 100% | 3.6 KiB/s | 154.0 B | 00m00s [ 3/156] Installing libgcc-0:14.2.1-6. 100% | 265.9 MiB/s | 272.3 KiB | 00m00s [ 4/156] Installing libssh-config-0:0. 100% | 0.0 B/s | 816.0 B | 00m00s [ 5/156] Installing publicsuffix-list- 100% | 0.0 B/s | 68.3 KiB | 00m00s [ 6/156] Installing fedora-release-ide 100% | 0.0 B/s | 976.0 B | 00m00s [ 7/156] Installing fedora-repos-rawhi 100% | 0.0 B/s | 2.4 KiB | 00m00s [ 8/156] Installing fedora-gpg-keys-0: 100% | 42.0 MiB/s | 172.2 KiB | 00m00s [ 9/156] Installing fedora-repos-0:42- 100% | 0.0 B/s | 5.7 KiB | 00m00s [ 10/156] Installing fedora-release-com 100% | 23.6 MiB/s | 24.1 KiB | 00m00s [ 11/156] Installing fedora-release-0:4 100% | 0.0 B/s | 124.0 B | 00m00s [ 12/156] Installing setup-0:2.15.0-5.f 100% | 54.5 MiB/s | 726.1 KiB | 00m00s >>> [RPM] /etc/hosts created as /etc/hosts.rpmnew [ 13/156] Installing filesystem-0:3.18- 100% | 3.3 MiB/s | 212.6 KiB | 00m00s [ 14/156] Installing basesystem-0:11-21 100% | 0.0 B/s | 124.0 B | 00m00s [ 15/156] Installing pkgconf-m4-0:2.3.0 100% | 0.0 B/s | 14.8 KiB | 00m00s [ 16/156] Installing pcre2-syntax-0:10. 100% | 248.1 MiB/s | 254.1 KiB | 00m00s [ 17/156] Installing ncurses-base-0:6.5 100% | 85.9 MiB/s | 351.7 KiB | 00m00s [ 18/156] Installing glibc-minimal-lang 100% | 0.0 B/s | 124.0 B | 00m00s [ 19/156] Installing ncurses-libs-0:6.5 100% | 191.8 MiB/s | 981.8 KiB | 00m00s [ 20/156] Installing glibc-0:2.40.9000- 100% | 303.3 MiB/s | 6.7 MiB | 00m00s [ 21/156] Installing bash-0:5.2.37-1.fc 100% | 408.5 MiB/s | 8.2 MiB | 00m00s [ 22/156] Installing glibc-common-0:2.4 100% | 173.6 MiB/s | 1.0 MiB | 00m00s [ 23/156] Installing glibc-gconv-extra- 100% | 260.5 MiB/s | 8.1 MiB | 00m00s [ 24/156] Installing zlib-ng-compat-0:2 100% | 131.7 MiB/s | 134.9 KiB | 00m00s [ 25/156] Installing bzip2-libs-0:1.0.8 100% | 79.9 MiB/s | 81.8 KiB | 00m00s [ 26/156] Installing xz-libs-1:5.6.3-2. 100% | 214.3 MiB/s | 219.5 KiB | 00m00s [ 27/156] Installing popt-0:1.19-7.fc41 100% | 70.1 MiB/s | 143.5 KiB | 00m00s [ 28/156] Installing readline-0:8.2-11. 100% | 241.8 MiB/s | 495.3 KiB | 00m00s [ 29/156] Installing libuuid-0:2.40.2-8 100% | 0.0 B/s | 42.5 KiB | 00m00s [ 30/156] Installing libblkid-0:2.40.2- 100% | 257.5 MiB/s | 263.6 KiB | 00m00s [ 31/156] Installing gmp-1:6.3.0-2.fc41 100% | 397.3 MiB/s | 813.7 KiB | 00m00s [ 32/156] Installing libattr-0:2.5.2-4. 100% | 0.0 B/s | 29.5 KiB | 00m00s [ 33/156] Installing libacl-0:2.3.2-2.f 100% | 0.0 B/s | 40.7 KiB | 00m00s [ 34/156] Installing libxcrypt-0:4.4.36 100% | 133.8 MiB/s | 274.1 KiB | 00m00s [ 35/156] Installing libstdc++-0:14.2.1 100% | 394.3 MiB/s | 2.8 MiB | 00m00s [ 36/156] Installing libzstd-0:1.5.6-2. 100% | 389.3 MiB/s | 797.2 KiB | 00m00s [ 37/156] Installing elfutils-libelf-0: 100% | 389.0 MiB/s | 1.2 MiB | 00m00s [ 38/156] Installing libeconf-0:0.7.5-1 100% | 66.8 MiB/s | 68.4 KiB | 00m00s [ 39/156] Installing gdbm-libs-1:1.23-7 100% | 120.7 MiB/s | 123.6 KiB | 00m00s [ 40/156] Installing dwz-0:0.15-8.fc42. 100% | 293.5 MiB/s | 300.6 KiB | 00m00s [ 41/156] Installing mpfr-0:4.2.1-5.fc4 100% | 271.4 MiB/s | 833.7 KiB | 00m00s [ 42/156] Installing gawk-0:5.3.0-4.fc4 100% | 288.7 MiB/s | 1.7 MiB | 00m00s [ 43/156] Installing unzip-0:6.0-65.fc4 100% | 196.2 MiB/s | 401.7 KiB | 00m00s [ 44/156] Installing file-libs-0:5.45-8 100% | 662.6 MiB/s | 9.9 MiB | 00m00s [ 45/156] Installing file-0:5.45-8.fc42 100% | 14.7 MiB/s | 105.2 KiB | 00m00s [ 46/156] Installing crypto-policies-0: 100% | 32.0 MiB/s | 163.7 KiB | 00m00s [ 47/156] Installing pcre2-0:10.44-1.fc 100% | 319.8 MiB/s | 654.9 KiB | 00m00s [ 48/156] Installing grep-0:3.11-9.fc41 100% | 200.7 MiB/s | 1.0 MiB | 00m00s [ 49/156] Installing xz-1:5.6.3-2.fc42. 100% | 247.4 MiB/s | 1.2 MiB | 00m00s [ 50/156] Installing libcap-ng-0:0.8.5- 100% | 69.4 MiB/s | 71.0 KiB | 00m00s [ 51/156] Installing audit-libs-0:4.0.2 100% | 162.8 MiB/s | 333.4 KiB | 00m00s [ 52/156] Installing pam-libs-0:1.7.0-3 100% | 138.5 MiB/s | 141.8 KiB | 00m00s [ 53/156] Installing libcap-0:2.71-1.fc 100% | 105.4 MiB/s | 215.8 KiB | 00m00s [ 54/156] Installing systemd-libs-0:257 100% | 317.2 MiB/s | 2.2 MiB | 00m00s [ 55/156] Installing libsmartcols-0:2.4 100% | 177.1 MiB/s | 181.4 KiB | 00m00s [ 56/156] Installing libsepol-0:3.8-0.r 100% | 267.9 MiB/s | 823.0 KiB | 00m00s [ 57/156] Installing libselinux-0:3.8-0 100% | 188.4 MiB/s | 192.9 KiB | 00m00s [ 58/156] Installing sed-0:4.9-3.fc41.x 100% | 212.3 MiB/s | 869.7 KiB | 00m00s [ 59/156] Installing findutils-1:4.10.0 100% | 309.7 MiB/s | 1.9 MiB | 00m00s [ 60/156] Installing libmount-0:2.40.2- 100% | 348.6 MiB/s | 356.9 KiB | 00m00s [ 61/156] Installing lz4-libs-0:1.10.0- 100% | 143.1 MiB/s | 146.6 KiB | 00m00s [ 62/156] Installing lua-libs-0:5.4.7-1 100% | 279.5 MiB/s | 286.2 KiB | 00m00s [ 63/156] Installing libcom_err-0:1.47. 100% | 66.7 MiB/s | 68.3 KiB | 00m00s [ 64/156] Installing alternatives-0:1.3 100% | 66.3 MiB/s | 67.9 KiB | 00m00s [ 65/156] Installing libffi-0:3.4.6-3.f 100% | 85.7 MiB/s | 87.8 KiB | 00m00s [ 66/156] Installing libtasn1-0:4.19.0- 100% | 173.3 MiB/s | 177.5 KiB | 00m00s [ 67/156] Installing p11-kit-0:0.25.5-4 100% | 277.0 MiB/s | 2.2 MiB | 00m00s [ 68/156] Installing libunistring-0:1.1 100% | 346.1 MiB/s | 1.7 MiB | 00m00s [ 69/156] Installing libidn2-0:2.3.7-2. 100% | 163.6 MiB/s | 335.1 KiB | 00m00s [ 70/156] Installing libpsl-0:0.21.5-4. 100% | 79.7 MiB/s | 81.7 KiB | 00m00s [ 71/156] Installing p11-kit-trust-0:0. 100% | 49.5 MiB/s | 405.5 KiB | 00m00s [ 72/156] Installing zstd-0:1.5.6-2.fc4 100% | 338.3 MiB/s | 1.7 MiB | 00m00s [ 73/156] Installing util-linux-core-0: 100% | 218.3 MiB/s | 1.5 MiB | 00m00s [ 74/156] Installing tar-2:1.35-4.fc41. 100% | 328.7 MiB/s | 3.0 MiB | 00m00s [ 75/156] Installing libsemanage-0:3.8- 100% | 149.9 MiB/s | 307.1 KiB | 00m00s [ 76/156] Installing shadow-utils-2:4.1 100% | 228.9 MiB/s | 4.1 MiB | 00m00s [ 77/156] Installing zip-0:3.0-42.fc42. 100% | 227.8 MiB/s | 699.8 KiB | 00m00s [ 78/156] Installing gdbm-1:1.23-7.fc41 100% | 227.4 MiB/s | 465.8 KiB | 00m00s [ 79/156] Installing cyrus-sasl-lib-0:2 100% | 329.4 MiB/s | 2.3 MiB | 00m00s [ 80/156] Installing libfdisk-0:2.40.2- 100% | 177.7 MiB/s | 364.0 KiB | 00m00s [ 81/156] Installing libxml2-0:2.12.8-2 100% | 342.4 MiB/s | 1.7 MiB | 00m00s [ 82/156] Installing bzip2-0:1.0.8-19.f 100% | 97.8 MiB/s | 100.2 KiB | 00m00s [ 83/156] Installing add-determinism-0: 100% | 347.3 MiB/s | 2.4 MiB | 00m00s [ 84/156] Installing build-reproducibil 100% | 0.0 B/s | 1.0 KiB | 00m00s [ 85/156] Installing sqlite-libs-0:3.47 100% | 358.5 MiB/s | 1.4 MiB | 00m00s [ 86/156] Installing ed-0:1.20.2-2.fc41 100% | 145.7 MiB/s | 149.2 KiB | 00m00s [ 87/156] Installing patch-0:2.7.6-25.f 100% | 261.9 MiB/s | 268.2 KiB | 00m00s [ 88/156] Installing elfutils-default-y 100% | 340.5 KiB/s | 2.0 KiB | 00m00s [ 89/156] Installing elfutils-libs-0:0. 100% | 216.4 MiB/s | 664.7 KiB | 00m00s [ 90/156] Installing cpio-0:2.15-2.fc41 100% | 219.9 MiB/s | 1.1 MiB | 00m00s [ 91/156] Installing diffutils-0:3.10-8 100% | 265.0 MiB/s | 1.6 MiB | 00m00s [ 92/156] Installing libgomp-0:14.2.1-6 100% | 254.5 MiB/s | 521.2 KiB | 00m00s [ 93/156] Installing json-c-0:0.18-1.fc 100% | 82.6 MiB/s | 84.6 KiB | 00m00s [ 94/156] Installing keyutils-libs-0:1. 100% | 54.5 MiB/s | 55.8 KiB | 00m00s [ 95/156] Installing libverto-0:0.3.2-9 100% | 30.5 MiB/s | 31.3 KiB | 00m00s [ 96/156] Installing jansson-0:2.14-1.f 100% | 92.3 MiB/s | 94.5 KiB | 00m00s [ 97/156] Installing libpkgconf-0:2.3.0 100% | 77.5 MiB/s | 79.3 KiB | 00m00s [ 98/156] Installing pkgconf-0:2.3.0-1. 100% | 89.0 MiB/s | 91.1 KiB | 00m00s [ 99/156] Installing pkgconf-pkg-config 100% | 0.0 B/s | 1.8 KiB | 00m00s [100/156] Installing xxhash-libs-0:0.8. 100% | 87.7 MiB/s | 89.8 KiB | 00m00s [101/156] Installing libbrotli-0:1.1.0- 100% | 273.4 MiB/s | 839.9 KiB | 00m00s [102/156] Installing libnghttp2-0:1.64. 100% | 171.5 MiB/s | 175.6 KiB | 00m00s [103/156] Installing libtool-ltdl-0:2.5 100% | 67.6 MiB/s | 69.2 KiB | 00m00s [104/156] Installing rust-srpm-macros-0 100% | 0.0 B/s | 5.6 KiB | 00m00s [105/156] Installing qt6-srpm-macros-0: 100% | 0.0 B/s | 732.0 B | 00m00s [106/156] Installing qt5-srpm-macros-0: 100% | 0.0 B/s | 776.0 B | 00m00s [107/156] Installing perl-srpm-macros-0 100% | 0.0 B/s | 1.1 KiB | 00m00s [108/156] Installing package-notes-srpm 100% | 0.0 B/s | 2.0 KiB | 00m00s [109/156] Installing openblas-srpm-macr 100% | 0.0 B/s | 392.0 B | 00m00s [110/156] Installing ocaml-srpm-macros- 100% | 0.0 B/s | 2.2 KiB | 00m00s [111/156] Installing kernel-srpm-macros 100% | 0.0 B/s | 2.3 KiB | 00m00s [112/156] Installing gnat-srpm-macros-0 100% | 0.0 B/s | 1.3 KiB | 00m00s [113/156] Installing ghc-srpm-macros-0: 100% | 0.0 B/s | 1.0 KiB | 00m00s [114/156] Installing fpc-srpm-macros-0: 100% | 0.0 B/s | 420.0 B | 00m00s [115/156] Installing ansible-srpm-macro 100% | 35.4 MiB/s | 36.2 KiB | 00m00s [116/156] Installing coreutils-common-0 100% | 361.0 MiB/s | 11.2 MiB | 00m00s [117/156] Installing openssl-libs-1:3.2 100% | 372.8 MiB/s | 7.8 MiB | 00m00s [118/156] Installing coreutils-0:9.5-11 100% | 234.8 MiB/s | 5.4 MiB | 00m00s [119/156] Installing ca-certificates-0: 100% | 1.9 MiB/s | 2.4 MiB | 00m01s [120/156] Installing krb5-libs-0:1.21.3 100% | 256.1 MiB/s | 2.3 MiB | 00m00s [121/156] Installing libarchive-0:3.7.7 100% | 304.1 MiB/s | 934.2 KiB | 00m00s [122/156] Installing libtirpc-0:1.3.6-1 100% | 202.5 MiB/s | 207.3 KiB | 00m00s [123/156] Installing gzip-0:1.13-2.fc41 100% | 192.7 MiB/s | 394.6 KiB | 00m00s [124/156] Installing authselect-libs-0: 100% | 163.5 MiB/s | 837.2 KiB | 00m00s [125/156] Installing cracklib-0:2.9.11- 100% | 81.5 MiB/s | 250.3 KiB | 00m00s [126/156] Installing libpwquality-0:1.4 100% | 105.0 MiB/s | 430.1 KiB | 00m00s [127/156] Installing libnsl2-0:2.0.1-2. 100% | 57.7 MiB/s | 59.1 KiB | 00m00s [128/156] Installing pam-0:1.7.0-3.fc42 100% | 157.8 MiB/s | 1.9 MiB | 00m00s [129/156] Installing libssh-0:0.11.1-1. 100% | 279.2 MiB/s | 571.7 KiB | 00m00s [130/156] Installing rpm-sequoia-0:1.7. 100% | 332.0 MiB/s | 2.3 MiB | 00m00s [131/156] Installing rpm-libs-0:4.20.0- 100% | 236.9 MiB/s | 727.7 KiB | 00m00s [132/156] Installing rpm-build-libs-0:4 100% | 202.6 MiB/s | 207.5 KiB | 00m00s [133/156] Installing libevent-0:2.1.12- 100% | 292.8 MiB/s | 899.5 KiB | 00m00s [134/156] Installing openldap-0:2.6.8-6 100% | 212.0 MiB/s | 651.2 KiB | 00m00s [135/156] Installing libcurl-0:8.11.1-2 100% | 266.4 MiB/s | 818.4 KiB | 00m00s [136/156] Installing elfutils-debuginfo 100% | 81.8 MiB/s | 83.8 KiB | 00m00s [137/156] Installing elfutils-0:0.192-7 100% | 330.6 MiB/s | 2.6 MiB | 00m00s [138/156] Installing binutils-0:2.43.50 100% | 363.4 MiB/s | 25.8 MiB | 00m00s [139/156] Installing gdb-minimal-0:15.2 100% | 353.5 MiB/s | 12.7 MiB | 00m00s [140/156] Installing debugedit-0:5.1-2. 100% | 198.3 MiB/s | 203.0 KiB | 00m00s [141/156] Installing curl-0:8.11.1-2.fc 100% | 40.3 MiB/s | 454.5 KiB | 00m00s [142/156] Installing rpm-0:4.20.0-1.fc4 100% | 167.1 MiB/s | 2.5 MiB | 00m00s [143/156] Installing efi-srpm-macros-0: 100% | 40.2 MiB/s | 41.2 KiB | 00m00s [144/156] Installing lua-srpm-macros-0: 100% | 0.0 B/s | 1.9 KiB | 00m00s [145/156] Installing zig-srpm-macros-0: 100% | 0.0 B/s | 1.7 KiB | 00m00s [146/156] Installing fonts-srpm-macros- 100% | 55.7 MiB/s | 57.0 KiB | 00m00s [147/156] Installing forge-srpm-macros- 100% | 0.0 B/s | 40.3 KiB | 00m00s [148/156] Installing go-srpm-macros-0:3 100% | 0.0 B/s | 62.0 KiB | 00m00s [149/156] Installing python-srpm-macros 100% | 50.9 MiB/s | 52.2 KiB | 00m00s [150/156] Installing redhat-rpm-config- 100% | 94.4 MiB/s | 193.2 KiB | 00m00s [151/156] Installing rpm-build-0:4.20.0 100% | 99.1 MiB/s | 202.9 KiB | 00m00s [152/156] Installing pyproject-srpm-mac 100% | 1.2 MiB/s | 2.5 KiB | 00m00s [153/156] Installing util-linux-0:2.40. 100% | 161.5 MiB/s | 3.7 MiB | 00m00s [154/156] Installing authselect-0:1.5.0 100% | 79.1 MiB/s | 161.9 KiB | 00m00s [155/156] Installing which-0:2.21-42.fc 100% | 80.5 MiB/s | 82.4 KiB | 00m00s [156/156] Installing info-0:7.1.1-2.fc4 100% | 213.8 KiB/s | 362.2 KiB | 00m02s Complete! Finish: installing minimal buildroot with dnf5 Start: creating root cache Finish: creating root cache Finish: chroot init INFO: Installed packages: INFO: add-determinism-0.4.3-1.fc42.x86_64 alternatives-1.30-1.fc41.x86_64 ansible-srpm-macros-1-16.fc41.noarch audit-libs-4.0.2-1.fc41.x86_64 authselect-1.5.0-8.fc42.x86_64 authselect-libs-1.5.0-8.fc42.x86_64 basesystem-11-21.fc41.noarch bash-5.2.37-1.fc42.x86_64 binutils-2.43.50-9.fc42.x86_64 build-reproducibility-srpm-macros-0.4.3-1.fc42.noarch bzip2-1.0.8-19.fc41.x86_64 bzip2-libs-1.0.8-19.fc41.x86_64 ca-certificates-2024.2.69_v8.0.401-3.fc42.noarch coreutils-9.5-11.fc42.x86_64 coreutils-common-9.5-11.fc42.x86_64 cpio-2.15-2.fc41.x86_64 cracklib-2.9.11-6.fc41.x86_64 crypto-policies-20241128-1.gitbb7b0b0.fc42.noarch curl-8.11.1-2.fc42.x86_64 cyrus-sasl-lib-2.1.28-27.fc41.x86_64 debugedit-5.1-2.fc42.x86_64 diffutils-3.10-8.fc41.x86_64 dwz-0.15-8.fc42.x86_64 ed-1.20.2-2.fc41.x86_64 efi-srpm-macros-5-13.fc42.noarch elfutils-0.192-7.fc42.x86_64 elfutils-debuginfod-client-0.192-7.fc42.x86_64 elfutils-default-yama-scope-0.192-7.fc42.noarch elfutils-libelf-0.192-7.fc42.x86_64 elfutils-libs-0.192-7.fc42.x86_64 fedora-gpg-keys-42-0.3.noarch fedora-release-42-0.11.noarch fedora-release-common-42-0.11.noarch fedora-release-identity-basic-42-0.11.noarch fedora-repos-42-0.3.noarch fedora-repos-rawhide-42-0.3.noarch file-5.45-8.fc42.x86_64 file-libs-5.45-8.fc42.x86_64 filesystem-3.18-29.fc42.x86_64 findutils-4.10.0-4.fc41.x86_64 fonts-srpm-macros-2.0.5-17.fc41.noarch forge-srpm-macros-0.4.0-1.fc42.noarch fpc-srpm-macros-1.3-13.fc41.noarch gawk-5.3.0-4.fc41.x86_64 gdb-minimal-15.2-4.fc42.x86_64 gdbm-1.23-7.fc41.x86_64 gdbm-libs-1.23-7.fc41.x86_64 ghc-srpm-macros-1.9.2-1.fc42.noarch glibc-2.40.9000-24.fc42.x86_64 glibc-common-2.40.9000-24.fc42.x86_64 glibc-gconv-extra-2.40.9000-24.fc42.x86_64 glibc-minimal-langpack-2.40.9000-24.fc42.x86_64 gmp-6.3.0-2.fc41.x86_64 gnat-srpm-macros-6-6.fc41.noarch go-srpm-macros-3.6.0-5.fc42.noarch gpg-pubkey-105ef944-65ca83d1 gpg-pubkey-31645531-66b6dccf gpg-pubkey-e99d6ad1-64d2612c grep-3.11-9.fc41.x86_64 gzip-1.13-2.fc41.x86_64 info-7.1.1-2.fc42.x86_64 jansson-2.14-1.fc42.x86_64 json-c-0.18-1.fc42.x86_64 kernel-srpm-macros-1.0-24.fc41.noarch keyutils-libs-1.6.3-4.fc41.x86_64 krb5-libs-1.21.3-3.fc42.x86_64 libacl-2.3.2-2.fc41.x86_64 libarchive-3.7.7-1.fc42.x86_64 libattr-2.5.2-4.fc41.x86_64 libblkid-2.40.2-8.fc42.x86_64 libbrotli-1.1.0-5.fc41.x86_64 libcap-2.71-1.fc42.x86_64 libcap-ng-0.8.5-3.fc41.x86_64 libcom_err-1.47.1-6.fc42.x86_64 libcurl-8.11.1-2.fc42.x86_64 libeconf-0.7.5-1.fc42.x86_64 libevent-2.1.12-14.fc41.x86_64 libfdisk-2.40.2-8.fc42.x86_64 libffi-3.4.6-3.fc42.x86_64 libgcc-14.2.1-6.fc42.x86_64 libgomp-14.2.1-6.fc42.x86_64 libidn2-2.3.7-2.fc41.x86_64 libmount-2.40.2-8.fc42.x86_64 libnghttp2-1.64.0-1.fc42.x86_64 libnsl2-2.0.1-2.fc41.x86_64 libpkgconf-2.3.0-1.fc42.x86_64 libpsl-0.21.5-4.fc41.x86_64 libpwquality-1.4.5-11.fc41.x86_64 libselinux-3.8-0.rc1.2.fc42.x86_64 libsemanage-3.8-0.rc1.1.fc42.x86_64 libsepol-3.8-0.rc1.1.fc42.x86_64 libsmartcols-2.40.2-8.fc42.x86_64 libssh-0.11.1-1.fc42.x86_64 libssh-config-0.11.1-1.fc42.noarch libstdc++-14.2.1-6.fc42.x86_64 libtasn1-4.19.0-9.fc41.x86_64 libtirpc-1.3.6-1.fc42.x86_64 libtool-ltdl-2.5.4-1.fc42.x86_64 libunistring-1.1-8.fc41.x86_64 libuuid-2.40.2-8.fc42.x86_64 libverto-0.3.2-9.fc41.x86_64 libxcrypt-4.4.36-11.fc42.x86_64 libxml2-2.12.8-2.fc41.x86_64 libzstd-1.5.6-2.fc41.x86_64 lua-libs-5.4.7-1.fc42.x86_64 lua-srpm-macros-1-14.fc41.noarch lz4-libs-1.10.0-1.fc41.x86_64 mpfr-4.2.1-5.fc41.x86_64 ncurses-base-6.5-2.20240629.fc41.noarch ncurses-libs-6.5-2.20240629.fc41.x86_64 ocaml-srpm-macros-10-3.fc41.noarch openblas-srpm-macros-2-18.fc41.noarch openldap-2.6.8-6.fc42.x86_64 openssl-libs-3.2.2-8.fc42.x86_64 p11-kit-0.25.5-4.fc42.x86_64 p11-kit-trust-0.25.5-4.fc42.x86_64 package-notes-srpm-macros-0.5-12.fc41.noarch pam-1.7.0-3.fc42.x86_64 pam-libs-1.7.0-3.fc42.x86_64 patch-2.7.6-25.fc41.x86_64 pcre2-10.44-1.fc41.1.x86_64 pcre2-syntax-10.44-1.fc41.1.noarch perl-srpm-macros-1-56.fc41.noarch pkgconf-2.3.0-1.fc42.x86_64 pkgconf-m4-2.3.0-1.fc42.noarch pkgconf-pkg-config-2.3.0-1.fc42.x86_64 popt-1.19-7.fc41.x86_64 publicsuffix-list-dafsa-20240107-4.fc41.noarch pyproject-srpm-macros-1.16.3-1.fc42.noarch python-srpm-macros-3.13-3.fc41.noarch qt5-srpm-macros-5.15.15-1.fc42.noarch qt6-srpm-macros-6.8.1-4.fc42.noarch readline-8.2-11.fc42.x86_64 redhat-rpm-config-296-1.fc42.noarch rpm-4.20.0-1.fc42.x86_64 rpm-build-4.20.0-1.fc42.x86_64 rpm-build-libs-4.20.0-1.fc42.x86_64 rpm-libs-4.20.0-1.fc42.x86_64 rpm-sequoia-1.7.0-3.fc42.x86_64 rust-srpm-macros-26.3-3.fc42.noarch sed-4.9-3.fc41.x86_64 setup-2.15.0-5.fc41.noarch shadow-utils-4.17.0~rc1-1.fc42.x86_64 sqlite-libs-3.47.2-1.fc42.x86_64 systemd-libs-257-1.fc42.x86_64 tar-1.35-4.fc41.x86_64 unzip-6.0-65.fc42.x86_64 util-linux-2.40.2-8.fc42.x86_64 util-linux-core-2.40.2-8.fc42.x86_64 which-2.21-42.fc41.x86_64 xxhash-libs-0.8.2-4.fc42.x86_64 xz-5.6.3-2.fc42.x86_64 xz-libs-5.6.3-2.fc42.x86_64 zig-srpm-macros-1-3.fc41.noarch zip-3.0-42.fc42.x86_64 zlib-ng-compat-2.2.2-1.fc42.x86_64 zstd-1.5.6-2.fc41.x86_64 Start: buildsrpm Start: rpmbuild -bs Building target platforms: x86_64 Building for target x86_64 setting SOURCE_DATE_EPOCH=1721347200 Wrote: /builddir/build/SRPMS/python-jupyter-server-2.14.2-2.fc42.src.rpm Finish: rpmbuild -bs INFO: chroot_scan: 1 files copied to /var/lib/copr-rpmbuild/results/chroot_scan INFO: /var/lib/mock/fedora-rawhide-x86_64-1734518440.388095/root/var/log/dnf5.log INFO: chroot_scan: creating tarball /var/lib/copr-rpmbuild/results/chroot_scan.tar.gz /bin/tar: Removing leading `/' from member names Finish: buildsrpm INFO: Done(/var/lib/copr-rpmbuild/workspace/workdir-c563ycor/python-jupyter-server/python-jupyter-server.spec) Config(child) 0 minutes 18 seconds INFO: Results and/or logs in: /var/lib/copr-rpmbuild/results INFO: Cleaning up build root ('cleanup_on_success=True') Start: clean chroot INFO: unmounting tmpfs. Finish: clean chroot INFO: Start(/var/lib/copr-rpmbuild/results/python-jupyter-server-2.14.2-2.fc42.src.rpm) Config(fedora-rawhide-x86_64) Start(bootstrap): chroot init INFO: mounting tmpfs at /var/lib/mock/fedora-rawhide-x86_64-bootstrap-1734518440.388095/root. INFO: reusing tmpfs at /var/lib/mock/fedora-rawhide-x86_64-bootstrap-1734518440.388095/root. INFO: calling preinit hooks INFO: enabled root cache INFO: enabled package manager cache Start(bootstrap): cleaning package manager metadata Finish(bootstrap): cleaning package manager metadata Finish(bootstrap): chroot init Start: chroot init INFO: mounting tmpfs at /var/lib/mock/fedora-rawhide-x86_64-1734518440.388095/root. INFO: calling preinit hooks INFO: enabled root cache Start: unpacking root cache Finish: unpacking root cache INFO: enabled package manager cache Start: cleaning package manager metadata Finish: cleaning package manager metadata INFO: enabled HW Info plugin INFO: Buildroot is handled by package management downloaded with a bootstrap image: rpm-4.20.0-1.fc42.x86_64 rpm-sequoia-1.7.0-3.fc42.x86_64 dnf5-5.2.8.1-2.fc42.x86_64 dnf5-plugins-5.2.8.1-2.fc42.x86_64 Finish: chroot init Start: build phase for python-jupyter-server-2.14.2-2.fc42.src.rpm Start: build setup for python-jupyter-server-2.14.2-2.fc42.src.rpm Building target platforms: x86_64 Building for target x86_64 setting SOURCE_DATE_EPOCH=1721347200 Wrote: /builddir/build/SRPMS/python-jupyter-server-2.14.2-2.fc42.src.rpm Updating and loading repositories: fedora 100% | 100.9 KiB/s | 28.8 KiB | 00m00s Copr repository 100% | 126.1 KiB/s | 1.5 KiB | 00m00s Repositories loaded. Package Arch Version Repository Size Installing: python3-devel x86_64 3.13.1-2.fc42 fedora 1.8 MiB Installing dependencies: expat x86_64 2.6.4-1.fc42 fedora 285.5 KiB libb2 x86_64 0.98.1-12.fc41 fedora 42.2 KiB mpdecimal x86_64 2.5.1-16.fc41 fedora 204.9 KiB pyproject-rpm-macros noarch 1.16.3-1.fc42 fedora 113.7 KiB python-pip-wheel noarch 24.3.1-1.fc42 fedora 1.2 MiB python-rpm-macros noarch 3.13-3.fc41 fedora 22.1 KiB python3 x86_64 3.13.1-2.fc42 fedora 30.6 KiB python3-libs x86_64 3.13.1-2.fc42 fedora 39.8 MiB python3-packaging noarch 24.2-2.fc42 fedora 555.7 KiB python3-rpm-generators noarch 14-11.fc41 fedora 81.7 KiB python3-rpm-macros noarch 3.13-3.fc41 fedora 6.4 KiB tzdata noarch 2024b-1.fc42 fedora 1.6 MiB Transaction Summary: Installing: 13 packages Total size of inbound packages is 12 MiB. Need to download 12 MiB. After this operation, 46 MiB extra will be used (install 46 MiB, remove 0 B). [ 1/13] python3-devel-0:3.13.1-2.fc42.x 100% | 23.2 MiB/s | 403.1 KiB | 00m00s [ 2/13] expat-0:2.6.4-1.fc42.x86_64 100% | 6.6 MiB/s | 114.5 KiB | 00m00s [ 3/13] libb2-0:0.98.1-12.fc41.x86_64 100% | 6.3 MiB/s | 25.7 KiB | 00m00s [ 4/13] mpdecimal-0:2.5.1-16.fc41.x86_6 100% | 21.7 MiB/s | 89.0 KiB | 00m00s [ 5/13] python-pip-wheel-0:24.3.1-1.fc4 100% | 70.8 MiB/s | 1.2 MiB | 00m00s [ 6/13] tzdata-0:2024b-1.fc42.noarch 100% | 36.6 MiB/s | 712.7 KiB | 00m00s [ 7/13] python3-0:3.13.1-2.fc42.x86_64 100% | 8.7 MiB/s | 26.9 KiB | 00m00s [ 8/13] pyproject-rpm-macros-0:1.16.3-1 100% | 10.9 MiB/s | 44.6 KiB | 00m00s [ 9/13] python-rpm-macros-0:3.13-3.fc41 100% | 5.8 MiB/s | 17.7 KiB | 00m00s [10/13] python3-libs-0:3.13.1-2.fc42.x8 100% | 156.9 MiB/s | 8.9 MiB | 00m00s [11/13] python3-rpm-generators-0:14-11. 100% | 2.6 MiB/s | 29.3 KiB | 00m00s [12/13] python3-rpm-macros-0:3.13-3.fc4 100% | 1.2 MiB/s | 12.4 KiB | 00m00s [13/13] python3-packaging-0:24.2-2.fc42 100% | 37.6 MiB/s | 153.8 KiB | 00m00s -------------------------------------------------------------------------------- [13/13] Total 100% | 34.6 MiB/s | 11.7 MiB | 00m00s Running transaction [ 1/15] Verify package files 100% | 351.0 B/s | 13.0 B | 00m00s [ 2/15] Prepare transaction 100% | 500.0 B/s | 13.0 B | 00m00s [ 3/15] Installing python-rpm-macros-0: 100% | 22.3 MiB/s | 22.8 KiB | 00m00s [ 4/15] Installing python3-rpm-macros-0 100% | 0.0 B/s | 6.7 KiB | 00m00s [ 5/15] Installing pyproject-rpm-macros 100% | 28.2 MiB/s | 115.7 KiB | 00m00s [ 6/15] Installing tzdata-0:2024b-1.fc4 100% | 55.4 MiB/s | 1.9 MiB | 00m00s [ 7/15] Installing python-pip-wheel-0:2 100% | 622.1 MiB/s | 1.2 MiB | 00m00s [ 8/15] Installing mpdecimal-0:2.5.1-16 100% | 201.2 MiB/s | 206.0 KiB | 00m00s [ 9/15] Installing libb2-0:0.98.1-12.fc 100% | 0.0 B/s | 43.3 KiB | 00m00s [10/15] Installing expat-0:2.6.4-1.fc42 100% | 46.8 MiB/s | 287.6 KiB | 00m00s [11/15] Installing python3-libs-0:3.13. 100% | 309.4 MiB/s | 40.2 MiB | 00m00s [12/15] Installing python3-0:3.13.1-2.f 100% | 31.6 MiB/s | 32.4 KiB | 00m00s [13/15] Installing python3-packaging-0: 100% | 184.9 MiB/s | 568.0 KiB | 00m00s [14/15] Installing python3-rpm-generato 100% | 81.0 MiB/s | 82.9 KiB | 00m00s [15/15] Installing python3-devel-0:3.13 100% | 72.6 MiB/s | 1.8 MiB | 00m00s Complete! Finish: build setup for python-jupyter-server-2.14.2-2.fc42.src.rpm Start: rpmbuild python-jupyter-server-2.14.2-2.fc42.src.rpm Building target platforms: x86_64 Building for target x86_64 setting SOURCE_DATE_EPOCH=1721347200 Executing(%mkbuilddir): /bin/sh -e /var/tmp/rpm-tmp.ha9MUP + umask 022 + cd /builddir/build/BUILD/python-jupyter-server-2.14.2-build + test -d /builddir/build/BUILD/python-jupyter-server-2.14.2-build + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w /builddir/build/BUILD/python-jupyter-server-2.14.2-build + /usr/bin/rm -rf /builddir/build/BUILD/python-jupyter-server-2.14.2-build + /usr/bin/mkdir -p /builddir/build/BUILD/python-jupyter-server-2.14.2-build + /usr/bin/mkdir -p /builddir/build/BUILD/python-jupyter-server-2.14.2-build/SPECPARTS + RPM_EC=0 ++ jobs -p + exit 0 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.1YuBBG + umask 022 + cd /builddir/build/BUILD/python-jupyter-server-2.14.2-build + cd /builddir/build/BUILD/python-jupyter-server-2.14.2-build + rm -rf jupyter_server-2.14.2 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/jupyter_server-2.14.2.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd jupyter_server-2.14.2 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + sed -i '/"pre-commit"/d' pyproject.toml + sed -i '/"overrides.*"/d' pyproject.toml + sed -i '/from overrides import overrides/d' jupyter_server/services/kernels/kernelmanager.py + sed -i /@overrides/d jupyter_server/services/kernels/kernelmanager.py + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.yUQYoa + umask 022 + cd /builddir/build/BUILD/python-jupyter-server-2.14.2-build + cd jupyter_server-2.14.2 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(packaging)' + echo 'python3dist(pip) >= 19' + '[' -f pyproject.toml ']' + echo '(python3dist(tomli) if python3-devel < 3.11)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + VALAFLAGS=-g + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + LT_SYS_LIBRARY_PATH=/usr/lib64: + CC=gcc + CXX=g++ + TMPDIR=/builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/.pyproject-builddir + RPM_TOXENV=py313 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/pyproject-wheeldir --output /builddir/build/BUILD/python-jupyter-server-2.14.2-build/python-jupyter-server-2.14.2-2.fc42.x86_64-pyproject-buildrequires -x test Handling hatchling >=1.11 from build-system.requires Requirement not satisfied: hatchling >=1.11 Exiting dependency generation pass: build backend + cat /builddir/build/BUILD/python-jupyter-server-2.14.2-build/python-jupyter-server-2.14.2-2.fc42.x86_64-pyproject-buildrequires + rm -rfv '*.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-jupyter-server-2.14.2-2.fc42.buildreqs.nosrc.rpm INFO: Going to install missing dynamic buildrequires Updating and loading repositories: fedora 100% | 104.6 KiB/s | 28.8 KiB | 00m00s Copr repository 100% | 126.1 KiB/s | 1.5 KiB | 00m00s Repositories loaded. Package "pyproject-rpm-macros-1.16.3-1.fc42.noarch" is already installed. Package "python3-devel-3.13.1-2.fc42.x86_64" is already installed. Package "python3-packaging-24.2-2.fc42.noarch" is already installed. Package Arch Version Repository Size Installing: python3-hatchling noarch 1.25.0-1.fc42 fedora 709.9 KiB python3-pip noarch 24.3.1-1.fc42 fedora 11.3 MiB Installing dependencies: python3-pathspec noarch 0.12.1-6.fc41 fedora 195.2 KiB python3-pluggy noarch 1.5.0-1.fc41 fedora 193.2 KiB python3-trove-classifiers noarch 2024.10.21.16-2.fc42 fedora 92.1 KiB Transaction Summary: Installing: 5 packages Total size of inbound packages is 3 MiB. Need to download 3 MiB. After this operation, 13 MiB extra will be used (install 13 MiB, remove 0 B). [1/5] python3-hatchling-0:1.25.0-1.fc42 100% | 13.9 MiB/s | 241.5 KiB | 00m00s [2/5] python3-trove-classifiers-0:2024. 100% | 8.8 MiB/s | 27.1 KiB | 00m00s [3/5] python3-pathspec-0:0.12.1-6.fc41. 100% | 2.5 MiB/s | 61.9 KiB | 00m00s [4/5] python3-pip-0:24.3.1-1.fc42.noarc 100% | 100.8 MiB/s | 2.7 MiB | 00m00s [5/5] python3-pluggy-0:1.5.0-1.fc41.noa 100% | 9.5 MiB/s | 58.6 KiB | 00m00s -------------------------------------------------------------------------------- [5/5] Total 100% | 10.4 MiB/s | 3.1 MiB | 00m00s Running transaction [1/7] Verify package files 100% | 500.0 B/s | 5.0 B | 00m00s [2/7] Prepare transaction 100% | 312.0 B/s | 5.0 B | 00m00s [3/7] Installing python3-pluggy-0:1.5.0 100% | 97.4 MiB/s | 199.4 KiB | 00m00s [4/7] Installing python3-trove-classifi 100% | 93.1 MiB/s | 95.3 KiB | 00m00s [5/7] Installing python3-pathspec-0:0.1 100% | 98.7 MiB/s | 202.0 KiB | 00m00s [6/7] Installing python3-hatchling-0:1. 100% | 74.1 MiB/s | 759.1 KiB | 00m00s [7/7] Installing python3-pip-0:24.3.1-1 100% | 168.3 MiB/s | 11.6 MiB | 00m00s Complete! Building target platforms: x86_64 Building for target x86_64 setting SOURCE_DATE_EPOCH=1721347200 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.NHwCaU + umask 022 + cd /builddir/build/BUILD/python-jupyter-server-2.14.2-build + cd jupyter_server-2.14.2 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(packaging)' + echo 'python3dist(pip) >= 19' + '[' -f pyproject.toml ']' + echo '(python3dist(tomli) if python3-devel < 3.11)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + VALAFLAGS=-g + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + LT_SYS_LIBRARY_PATH=/usr/lib64: + CC=gcc + CXX=g++ + TMPDIR=/builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/.pyproject-builddir + RPM_TOXENV=py313 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/pyproject-wheeldir --output /builddir/build/BUILD/python-jupyter-server-2.14.2-build/python-jupyter-server-2.14.2-2.fc42.x86_64-pyproject-buildrequires -x test Handling hatchling >=1.11 from build-system.requires Requirement satisfied: hatchling >=1.11 (installed: hatchling 1.25.0) Handling hatch-jupyter-builder>=0.8.1 from get_requires_for_build_wheel Requirement not satisfied: hatch-jupyter-builder>=0.8.1 Exiting dependency generation pass: get_requires_for_build_wheel + cat /builddir/build/BUILD/python-jupyter-server-2.14.2-build/python-jupyter-server-2.14.2-2.fc42.x86_64-pyproject-buildrequires + rm -rfv '*.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-jupyter-server-2.14.2-2.fc42.buildreqs.nosrc.rpm INFO: Going to install missing dynamic buildrequires Updating and loading repositories: fedora 100% | 103.4 KiB/s | 28.8 KiB | 00m00s Copr repository 100% | 94.5 KiB/s | 1.5 KiB | 00m00s Repositories loaded. Package "pyproject-rpm-macros-1.16.3-1.fc42.noarch" is already installed. Package "python3-devel-3.13.1-2.fc42.x86_64" is already installed. Package "python3-hatchling-1.25.0-1.fc42.noarch" is already installed. Package "python3-packaging-24.2-2.fc42.noarch" is already installed. Package "python3-pip-24.3.1-1.fc42.noarch" is already installed. Total size of inbound packages is 55 KiB. Need to download 55 KiB. After this operation, 97 KiB extra will be used (install 97 KiB, remove 0 B). Package Arch Version Repository Size Installing: python3-hatch-jupyter-builder noarch 0.9.0-3.fc41 fedora 96.6 KiB Transaction Summary: Installing: 1 package [1/1] python3-hatch-jupyter-builder-0:0 100% | 4.2 MiB/s | 55.4 KiB | 00m00s -------------------------------------------------------------------------------- [1/1] Total 100% | 191.6 KiB/s | 55.4 KiB | 00m00s Running transaction [1/3] Verify package files 100% | 0.0 B/s | 1.0 B | 00m00s [2/3] Prepare transaction 100% | 166.0 B/s | 1.0 B | 00m00s [3/3] Installing python3-hatch-jupyter- 100% | 10.6 MiB/s | 108.2 KiB | 00m00s Complete! Building target platforms: x86_64 Building for target x86_64 setting SOURCE_DATE_EPOCH=1721347200 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.NQATx1 + umask 022 + cd /builddir/build/BUILD/python-jupyter-server-2.14.2-build + cd jupyter_server-2.14.2 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(packaging)' + echo 'python3dist(pip) >= 19' + '[' -f pyproject.toml ']' + echo '(python3dist(tomli) if python3-devel < 3.11)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + VALAFLAGS=-g + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + LT_SYS_LIBRARY_PATH=/usr/lib64: + CC=gcc + CXX=g++ + TMPDIR=/builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/.pyproject-builddir + RPM_TOXENV=py313 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/pyproject-wheeldir --output /builddir/build/BUILD/python-jupyter-server-2.14.2-build/python-jupyter-server-2.14.2-2.fc42.x86_64-pyproject-buildrequires -x test Handling hatchling >=1.11 from build-system.requires Requirement satisfied: hatchling >=1.11 (installed: hatchling 1.25.0) Handling hatch-jupyter-builder>=0.8.1 from get_requires_for_build_wheel Requirement satisfied: hatch-jupyter-builder>=0.8.1 (installed: hatch-jupyter-builder 0.9.0) Handling anyio>=3.1.0 from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: anyio>=3.1.0 Handling argon2-cffi>=21.1 from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: argon2-cffi>=21.1 Handling jinja2>=3.0.3 from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: jinja2>=3.0.3 Handling jupyter-client>=7.4.4 from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: jupyter-client>=7.4.4 Handling jupyter-core!=5.0.*,>=4.12 from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: jupyter-core!=5.0.*,>=4.12 Handling jupyter-events>=0.9.0 from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: jupyter-events>=0.9.0 Handling jupyter-server-terminals>=0.4.4 from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: jupyter-server-terminals>=0.4.4 Handling nbconvert>=6.4.4 from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: nbconvert>=6.4.4 Handling nbformat>=5.3.0 from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: nbformat>=5.3.0 Handling packaging>=22.0 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: packaging>=22.0 (installed: packaging 24.2) Handling prometheus-client>=0.9 from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: prometheus-client>=0.9 Handling pywinpty>=2.0.1; os_name == 'nt' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: pywinpty>=2.0.1; os_name == 'nt' Handling pyzmq>=24 from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: pyzmq>=24 Handling send2trash>=1.8.2 from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: send2trash>=1.8.2 Handling terminado>=0.8.3 from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: terminado>=0.8.3 Handling tornado>=6.2.0 from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: tornado>=6.2.0 Handling traitlets>=5.6.0 from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: traitlets>=5.6.0 Handling websocket-client>=1.7 from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: websocket-client>=1.7 Handling ipykernel; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: ipykernel; extra == 'docs' Handling jinja2; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: jinja2; extra == 'docs' Handling jupyter-client; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: jupyter-client; extra == 'docs' Handling myst-parser; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: myst-parser; extra == 'docs' Handling nbformat; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: nbformat; extra == 'docs' Handling prometheus-client; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: prometheus-client; extra == 'docs' Handling pydata-sphinx-theme; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: pydata-sphinx-theme; extra == 'docs' Handling send2trash; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: send2trash; extra == 'docs' Handling sphinx-autodoc-typehints; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: sphinx-autodoc-typehints; extra == 'docs' Handling sphinxcontrib-github-alt; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: sphinxcontrib-github-alt; extra == 'docs' Handling sphinxcontrib-openapi>=0.8.0; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: sphinxcontrib-openapi>=0.8.0; extra == 'docs' Handling sphinxcontrib-spelling; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: sphinxcontrib-spelling; extra == 'docs' Handling sphinxemoji; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: sphinxemoji; extra == 'docs' Handling tornado; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: tornado; extra == 'docs' Handling typing-extensions; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: typing-extensions; extra == 'docs' Handling flaky; extra == 'test' from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: flaky; extra == 'test' Handling ipykernel; extra == 'test' from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: ipykernel; extra == 'test' Handling pytest-console-scripts; extra == 'test' from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: pytest-console-scripts; extra == 'test' Handling pytest-jupyter[server]>=0.7; extra == 'test' from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: pytest-jupyter[server]>=0.7; extra == 'test' Handling pytest-timeout; extra == 'test' from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: pytest-timeout; extra == 'test' Handling pytest<9,>=7.0; extra == 'test' from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: pytest<9,>=7.0; extra == 'test' Handling requests; extra == 'test' from hook generated metadata: Requires-Dist (jupyter_server) Requirement not satisfied: requests; extra == 'test' + cat /builddir/build/BUILD/python-jupyter-server-2.14.2-build/python-jupyter-server-2.14.2-2.fc42.x86_64-pyproject-buildrequires + rm -rfv jupyter_server-2.14.2.dist-info/ removed 'jupyter_server-2.14.2.dist-info/METADATA' removed directory 'jupyter_server-2.14.2.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-jupyter-server-2.14.2-2.fc42.buildreqs.nosrc.rpm INFO: Going to install missing dynamic buildrequires Updating and loading repositories: Copr repository 100% | 100.8 KiB/s | 1.5 KiB | 00m00s fedora 100% | 107.7 KiB/s | 28.8 KiB | 00m00s Repositories loaded. Package "pyproject-rpm-macros-1.16.3-1.fc42.noarch" is already installed. Package "python3-devel-3.13.1-2.fc42.x86_64" is already installed. Package "python3-hatch-jupyter-builder-0.9.0-3.fc41.noarch" is already installed. Package "python3-hatchling-1.25.0-1.fc42.noarch" is already installed. Package "python3-packaging-24.2-2.fc42.noarch" is already installed. Package "python3-packaging-24.2-2.fc42.noarch" is already installed. Package "python3-pip-24.3.1-1.fc42.noarch" is already installed. Package Arch Version Repository Size Installing: python3-anyio noarch 3.7.1-5.fc41 fedora 851.7 KiB python3-argon2-cffi noarch 23.1.0-3.fc41 fedora 70.0 KiB python3-flaky noarch 3.8.1-3.fc41 fedora 129.4 KiB python3-ipykernel noarch 6.29.3-8.fc42 fedora 953.8 KiB python3-jinja2 noarch 3.1.4-5.fc41 fedora 2.9 MiB python3-jupyter-client noarch 8.6.1-10.fc42 fedora 893.7 KiB python3-jupyter-core noarch 5.7.2-7.fc42 fedora 196.8 KiB python3-jupyter-events noarch 0.11.0-1.fc42 copr_base 91.8 KiB python3-jupyter-server-terminals noarch 0.5.3-4.fc41 fedora 66.3 KiB python3-nbconvert noarch 7.16.4-4.fc41 fedora 1.2 MiB python3-nbformat noarch 5.9.2-5.fc41 fedora 541.7 KiB python3-prometheus_client noarch 0.21.0-1.fc42 fedora 345.9 KiB python3-pytest noarch 8.3.4-1.fc42 fedora 20.8 MiB python3-pytest-console-scripts noarch 1.4.1-7.fc41 fedora 75.2 KiB python3-pytest-jupyter noarch 0.10.1-4.fc41 fedora 81.9 KiB python3-pytest-jupyter+server noarch 0.10.1-4.fc41 fedora 13.1 KiB python3-pytest-timeout noarch 2.3.1-4.fc41 fedora 80.6 KiB python3-pyzmq x86_64 26.2.0-3.fc42 fedora 1.3 MiB python3-requests noarch 2.32.3-3.fc41 fedora 485.9 KiB python3-send2trash noarch 1.8.2-8.fc41 fedora 68.0 KiB python3-terminado noarch 0.18.0-6.fc41 fedora 120.7 KiB python3-tornado x86_64 6.4.1-1.fc42 fedora 5.1 MiB python3-traitlets noarch 5.14.3-3.fc41 fedora 966.9 KiB python3-websocket-client noarch 1.8.0-2.fc42 fedora 445.0 KiB Installing dependencies: libargon2 x86_64 20190702-6.fc41 fedora 49.1 KiB libsodium x86_64 1.0.20-2.fc41 fedora 393.0 KiB libunwind x86_64 1.8.0-5.fc42 fedora 179.5 KiB libxslt x86_64 1.1.42-2.fc41 fedora 483.1 KiB libyaml x86_64 0.2.5-15.fc41 fedora 134.4 KiB openpgm x86_64 5.2.122-35.fc41 fedora 300.3 KiB python-jupyter-filesystem noarch 5.7.2-7.fc42 fedora 0.0 B python3-argon2-cffi-bindings x86_64 21.2.0-8.fc41 fedora 55.0 KiB python3-arrow noarch 1.2.3-11.fc42 fedora 557.3 KiB python3-asttokens noarch 2.4.1-7.fc41 fedora 209.1 KiB python3-attrs noarch 24.3.0-2.fc42 fedora 396.8 KiB python3-beautifulsoup4 noarch 4.12.3-8.fc42 fedora 1.4 MiB python3-bleach noarch 6.2.0-1.fc42 fedora 187.5 KiB python3-cffi x86_64 1.17.1-1.fc42 fedora 1.3 MiB python3-charset-normalizer noarch 3.4.0-1.fc42 fedora 319.9 KiB python3-comm noarch 0.2.2-3.fc41 fedora 32.3 KiB python3-dateutil noarch 1:2.8.2-16.fc41 fedora 879.2 KiB python3-decorator noarch 5.1.1-13.fc42 fedora 78.4 KiB python3-defusedxml noarch 0.7.1-17.fc42 fedora 196.4 KiB python3-executing noarch 2.1.0^20240916git3f11fdc-1.fc42 fedora 265.2 KiB python3-fastjsonschema noarch 2.21.1-1.fc42 fedora 189.0 KiB python3-fqdn noarch 1.5.1-14.fc41 fedora 20.8 KiB python3-html5lib noarch 1:1.1-25.fc41 fedora 1.5 MiB python3-idna noarch 3.10-1.fc42 fedora 628.0 KiB python3-iniconfig noarch 1.1.1-23.fc41 fedora 20.6 KiB python3-ipython noarch 8.30.0-2.fc42 fedora 4.5 MiB python3-isoduration noarch 20.11.0-10.fc41 fedora 53.4 KiB python3-jedi noarch 0.19.1-10.fc41 fedora 5.6 MiB python3-json-logger noarch 2.0.4-8.fc41 fedora 30.2 KiB python3-jsonpointer noarch 2.4-3.fc41 fedora 45.7 KiB python3-jsonschema noarch 4.19.1-6.fc41 fedora 850.0 KiB python3-jsonschema+format-nongpl noarch 4.19.1-6.fc41 fedora 8.9 KiB python3-jsonschema-specifications noarch 2023.11.2-6.fc41 fedora 45.8 KiB python3-jupyter-server noarch 2.14.2-2.fc41 fedora 2.9 MiB python3-jupyterlab_pygments noarch 0.3.0-7.fc41 fedora 41.5 KiB python3-lxml x86_64 5.3.0-1.fc42 fedora 4.9 MiB python3-markupsafe x86_64 3.0.2-1.fc42 fedora 56.1 KiB python3-matplotlib-inline noarch 0.1.7-3.fc41 fedora 39.6 KiB python3-mistune noarch 3.0.2-1.fc42 fedora 315.3 KiB python3-nbclient noarch 0.10.1-1.fc42 fedora 217.3 KiB python3-nest-asyncio noarch 1.6.0-4.fc41 fedora 25.8 KiB python3-pandocfilters noarch 1.5.1-3.fc41 fedora 38.6 KiB python3-parso noarch 0.8.4-3.fc41 fedora 896.3 KiB python3-pexpect noarch 4.9.0-8.fc42 fedora 620.4 KiB python3-platformdirs noarch 4.2.2-2.fc41 fedora 168.6 KiB python3-ply noarch 3.11-25.fc41 fedora 568.2 KiB python3-prompt-toolkit noarch 3.0.41-5.fc41 fedora 3.7 MiB python3-psutil x86_64 5.9.8-5.fc42 fedora 1.4 MiB python3-ptyprocess noarch 0.7.0-9.fc41 fedora 79.8 KiB python3-pure-eval noarch 0.2.3-1.fc41 fedora 100.3 KiB python3-pycparser noarch 2.20-18.fc41 fedora 821.0 KiB python3-pygments noarch 2.18.0-2.fc42 fedora 10.6 MiB python3-pyyaml x86_64 6.0.1-18.fc41 fedora 791.1 KiB python3-referencing noarch 0.35.1-3.fc41 fedora 326.0 KiB python3-rfc3339-validator noarch 0.1.4-14.fc41 fedora 9.6 KiB python3-rfc3986-validator noarch 0.1.1-11.fc41 fedora 13.3 KiB python3-rpds-py x86_64 0.22.3-1.fc42 fedora 720.2 KiB python3-setuptools noarch 74.1.3-4.fc42 fedora 8.4 MiB python3-six noarch 1.16.0-23.fc41 fedora 118.3 KiB python3-sniffio noarch 1.3.1-3.fc41 fedora 35.0 KiB python3-soupsieve noarch 2.6-2.fc42 fedora 294.5 KiB python3-stack-data noarch 0.6.3-11.fc42 fedora 208.2 KiB python3-tinycss2 noarch 1.4.0-1.fc42 fedora 250.7 KiB python3-uri-template noarch 1.2.0-10.fc41 fedora 81.1 KiB python3-urllib3 noarch 2.2.3-3.fc42 fedora 1.0 MiB python3-wcwidth noarch 0.2.13-5.fc41 fedora 559.8 KiB python3-webcolors noarch 24.11.1-1.fc42 fedora 84.1 KiB python3-webencodings noarch 0.5.1-26.fc41 fedora 86.0 KiB zeromq x86_64 4.3.5-17.fc41 fedora 885.4 KiB Transaction Summary: Installing: 93 packages Total size of inbound packages is 22 MiB. Need to download 22 MiB. After this operation, 100 MiB extra will be used (install 100 MiB, remove 0 B). [ 1/93] python3-anyio-0:3.7.1-5.fc41.no 100% | 17.7 MiB/s | 217.9 KiB | 00m00s [ 2/93] python3-jupyter-core-0:5.7.2-7. 100% | 5.1 MiB/s | 78.2 KiB | 00m00s [ 3/93] python3-argon2-cffi-0:23.1.0-3. 100% | 1.6 MiB/s | 40.5 KiB | 00m00s [ 4/93] python3-flaky-0:3.8.1-3.fc41.no 100% | 2.8 MiB/s | 45.7 KiB | 00m00s [ 5/93] python3-jinja2-0:3.1.4-5.fc41.n 100% | 68.8 MiB/s | 492.8 KiB | 00m00s [ 6/93] python3-ipykernel-0:6.29.3-8.fc 100% | 11.4 MiB/s | 257.9 KiB | 00m00s [ 7/93] python3-jupyter-server-terminal 100% | 2.2 MiB/s | 36.5 KiB | 00m00s [ 8/93] python3-nbformat-0:5.9.2-5.fc41 100% | 28.4 MiB/s | 145.2 KiB | 00m00s [ 9/93] python3-jupyter-client-0:8.6.1- 100% | 9.5 MiB/s | 242.6 KiB | 00m00s [10/93] python3-pytest-console-scripts- 100% | 6.5 MiB/s | 26.8 KiB | 00m00s [11/93] python3-nbconvert-0:7.16.4-4.fc 100% | 15.8 MiB/s | 356.1 KiB | 00m00s [12/93] python3-pytest-jupyter+server-0 100% | 866.6 KiB/s | 9.5 KiB | 00m00s [13/93] python3-prometheus_client-0:0.2 100% | 6.8 MiB/s | 132.3 KiB | 00m00s [14/93] python3-pytest-timeout-0:2.3.1- 100% | 14.5 MiB/s | 29.7 KiB | 00m00s [15/93] python3-pytest-jupyter-0:0.10.1 100% | 2.4 MiB/s | 44.1 KiB | 00m00s [16/93] python3-requests-0:2.32.3-3.fc4 100% | 38.9 MiB/s | 159.4 KiB | 00m00s [17/93] python3-send2trash-0:1.8.2-8.fc 100% | 3.4 MiB/s | 48.7 KiB | 00m00s [18/93] python3-terminado-0:0.18.0-6.fc 100% | 3.0 MiB/s | 43.1 KiB | 00m00s [19/93] python3-traitlets-0:5.14.3-3.fc 100% | 34.8 MiB/s | 214.0 KiB | 00m00s [20/93] python3-tornado-0:6.4.1-1.fc42. 100% | 90.0 MiB/s | 921.9 KiB | 00m00s [21/93] python3-pyzmq-0:26.2.0-3.fc42.x 100% | 12.8 MiB/s | 407.4 KiB | 00m00s [22/93] python3-websocket-client-0:1.8. 100% | 27.2 MiB/s | 139.4 KiB | 00m00s [23/93] python3-platformdirs-0:4.2.2-2. 100% | 22.6 MiB/s | 46.3 KiB | 00m00s [24/93] python3-idna-0:3.10-1.fc42.noar 100% | 38.1 MiB/s | 117.2 KiB | 00m00s [25/93] python3-sniffio-0:1.3.1-3.fc41. 100% | 13.3 MiB/s | 27.1 KiB | 00m00s [26/93] python3-argon2-cffi-bindings-0: 100% | 2.6 MiB/s | 26.6 KiB | 00m00s [27/93] python3-jupyter-events-0:0.11.0 100% | 2.4 MiB/s | 44.3 KiB | 00m00s [28/93] python-jupyter-filesystem-0:5.7 100% | 549.6 KiB/s | 9.3 KiB | 00m00s [29/93] python3-matplotlib-inline-0:0.1 100% | 2.1 MiB/s | 24.0 KiB | 00m00s [30/93] python3-comm-0:0.2.2-3.fc41.noa 100% | 1.0 MiB/s | 20.4 KiB | 00m00s [31/93] python3-psutil-0:5.9.8-5.fc42.x 100% | 88.5 MiB/s | 272.0 KiB | 00m00s [32/93] python3-markupsafe-0:3.0.2-1.fc 100% | 14.7 MiB/s | 30.0 KiB | 00m00s [33/93] python3-dateutil-1:2.8.2-16.fc4 100% | 117.1 MiB/s | 359.7 KiB | 00m00s [34/93] python3-beautifulsoup4-0:4.12.3 100% | 79.4 MiB/s | 325.3 KiB | 00m00s [35/93] python3-bleach-0:6.2.0-1.fc42.n 100% | 5.4 MiB/s | 66.6 KiB | 00m00s [36/93] python3-ipython-0:8.30.0-2.fc42 100% | 23.6 MiB/s | 1.1 MiB | 00m00s [37/93] python3-defusedxml-0:0.7.1-17.f 100% | 28.5 MiB/s | 58.4 KiB | 00m00s [38/93] python3-nest-asyncio-0:1.6.0-4. 100% | 567.6 KiB/s | 19.3 KiB | 00m00s [39/93] python3-jupyterlab_pygments-0:0 100% | 2.5 MiB/s | 28.2 KiB | 00m00s [40/93] python3-pandocfilters-0:1.5.1-3 100% | 2.5 MiB/s | 20.8 KiB | 00m00s [41/93] python3-nbclient-0:0.10.1-1.fc4 100% | 3.7 MiB/s | 67.5 KiB | 00m00s [42/93] python3-mistune-0:3.0.2-1.fc42. 100% | 5.6 MiB/s | 131.9 KiB | 00m00s [43/93] python3-pygments-0:2.18.0-2.fc4 100% | 140.6 MiB/s | 2.5 MiB | 00m00s [44/93] python3-tinycss2-0:1.4.0-1.fc42 100% | 4.4 MiB/s | 71.7 KiB | 00m00s [45/93] python3-fastjsonschema-0:2.21.1 100% | 4.0 MiB/s | 65.2 KiB | 00m00s [46/93] python3-decorator-0:5.1.1-13.fc 100% | 10.1 MiB/s | 31.0 KiB | 00m00s [47/93] python3-jsonschema-0:4.19.1-6.f 100% | 39.9 MiB/s | 204.2 KiB | 00m00s [48/93] python3-setuptools-0:74.1.3-4.f 100% | 196.3 MiB/s | 2.0 MiB | 00m00s [49/93] zeromq-0:4.3.5-17.fc41.x86_64 100% | 64.6 MiB/s | 462.8 KiB | 00m00s [50/93] python3-charset-normalizer-0:3. 100% | 35.5 MiB/s | 109.2 KiB | 00m00s [51/93] python3-urllib3-0:2.2.3-3.fc42. 100% | 67.8 MiB/s | 277.8 KiB | 00m00s [52/93] python3-ptyprocess-0:0.7.0-9.fc 100% | 35.2 MiB/s | 36.0 KiB | 00m00s [53/93] python3-json-logger-0:2.0.4-8.f 100% | 5.1 MiB/s | 21.0 KiB | 00m00s [54/93] python3-jsonschema+format-nongp 100% | 2.4 MiB/s | 10.0 KiB | 00m00s [55/93] python3-pyyaml-0:6.0.1-18.fc41. 100% | 56.5 MiB/s | 231.6 KiB | 00m00s [56/93] python3-referencing-0:0.35.1-3. 100% | 20.7 MiB/s | 84.9 KiB | 00m00s [57/93] python3-rfc3339-validator-0:0.1 100% | 7.2 MiB/s | 14.8 KiB | 00m00s [58/93] python3-rfc3986-validator-0:0.1 100% | 1.7 MiB/s | 13.8 KiB | 00m00s [59/93] python3-cffi-0:1.17.1-1.fc42.x8 100% | 100.1 MiB/s | 307.6 KiB | 00m00s [60/93] libargon2-0:20190702-6.fc41.x86 100% | 2.3 MiB/s | 28.4 KiB | 00m00s [61/93] python3-jupyter-server-0:2.14.2 100% | 14.7 MiB/s | 603.2 KiB | 00m00s [62/93] python3-pexpect-0:4.9.0-8.fc42. 100% | 57.7 MiB/s | 177.1 KiB | 00m00s [63/93] python3-prompt-toolkit-0:3.0.41 100% | 138.3 MiB/s | 849.8 KiB | 00m00s [64/93] python3-six-0:1.16.0-23.fc41.no 100% | 20.1 MiB/s | 41.2 KiB | 00m00s [65/93] python3-stack-data-0:0.6.3-11.f 100% | 4.1 MiB/s | 63.6 KiB | 00m00s [66/93] python3-soupsieve-0:2.6-2.fc42. 100% | 23.8 MiB/s | 97.6 KiB | 00m00s [67/93] python3-lxml-0:5.3.0-1.fc42.x86 100% | 85.6 MiB/s | 1.4 MiB | 00m00s [68/93] python3-html5lib-1:1.1-25.fc41. 100% | 57.1 MiB/s | 292.4 KiB | 00m00s [69/93] python3-webencodings-0:0.5.1-26 100% | 15.3 MiB/s | 31.4 KiB | 00m00s [70/93] python3-jsonschema-specificatio 100% | 26.4 MiB/s | 27.0 KiB | 00m00s [71/93] python3-rpds-py-0:0.22.3-1.fc42 100% | 67.9 MiB/s | 278.0 KiB | 00m00s [72/93] python3-jedi-0:0.19.1-10.fc41.n 100% | 38.0 MiB/s | 1.6 MiB | 00m00s [73/93] libsodium-0:1.0.20-2.fc41.x86_6 100% | 42.9 MiB/s | 175.7 KiB | 00m00s [74/93] libunwind-0:1.8.0-5.fc42.x86_64 100% | 23.5 MiB/s | 72.1 KiB | 00m00s [75/93] python3-attrs-0:24.3.0-2.fc42.n 100% | 8.5 MiB/s | 131.0 KiB | 00m00s [76/93] openpgm-0:5.2.122-35.fc41.x86_6 100% | 57.2 MiB/s | 175.7 KiB | 00m00s [77/93] python3-fqdn-0:1.5.1-14.fc41.no 100% | 8.7 MiB/s | 17.8 KiB | 00m00s [78/93] python3-isoduration-0:20.11.0-1 100% | 19.3 MiB/s | 39.5 KiB | 00m00s [79/93] python3-uri-template-0:1.2.0-10 100% | 17.7 MiB/s | 36.3 KiB | 00m00s [80/93] libyaml-0:0.2.5-15.fc41.x86_64 100% | 29.0 MiB/s | 59.4 KiB | 00m00s [81/93] python3-webcolors-0:24.11.1-1.f 100% | 9.2 MiB/s | 37.6 KiB | 00m00s [82/93] python3-pycparser-0:2.20-18.fc4 100% | 77.9 MiB/s | 159.5 KiB | 00m00s [83/93] python3-jsonpointer-0:2.4-3.fc4 100% | 2.3 MiB/s | 21.4 KiB | 00m00s [84/93] python3-parso-0:0.8.4-3.fc41.no 100% | 69.1 MiB/s | 212.3 KiB | 00m00s [85/93] python3-wcwidth-0:0.2.13-5.fc41 100% | 17.1 MiB/s | 52.4 KiB | 00m00s [86/93] python3-executing-0:2.1.0^20240 100% | 22.8 MiB/s | 70.2 KiB | 00m00s [87/93] libxslt-0:1.1.42-2.fc41.x86_64 100% | 61.6 MiB/s | 189.1 KiB | 00m00s [88/93] python3-arrow-0:1.2.3-11.fc42.n 100% | 50.6 MiB/s | 155.5 KiB | 00m00s [89/93] python3-asttokens-0:2.4.1-7.fc4 100% | 5.6 MiB/s | 62.6 KiB | 00m00s [90/93] python3-pure-eval-0:0.2.3-1.fc4 100% | 3.8 MiB/s | 38.4 KiB | 00m00s [91/93] python3-ply-0:3.11-25.fc41.noar 100% | 44.3 MiB/s | 136.2 KiB | 00m00s [92/93] python3-iniconfig-0:1.1.1-23.fc 100% | 8.8 MiB/s | 18.1 KiB | 00m00s [93/93] python3-pytest-0:8.3.4-1.fc42.n 100% | 119.5 MiB/s | 2.2 MiB | 00m00s -------------------------------------------------------------------------------- [93/93] Total 100% | 37.4 MiB/s | 22.5 MiB | 00m01s Running transaction [ 1/95] Verify package files 100% | 1.2 KiB/s | 93.0 B | 00m00s [ 2/95] Prepare transaction 100% | 1.4 KiB/s | 93.0 B | 00m00s [ 3/95] Installing python3-traitlets-0: 100% | 192.2 MiB/s | 984.0 KiB | 00m00s [ 4/95] Installing python3-six-0:1.16.0 100% | 117.9 MiB/s | 120.7 KiB | 00m00s [ 5/95] Installing python3-idna-0:3.10- 100% | 206.5 MiB/s | 634.3 KiB | 00m00s [ 6/95] Installing python3-tornado-0:6. 100% | 322.7 MiB/s | 5.2 MiB | 00m00s [ 7/95] Installing python3-webencodings 100% | 29.5 MiB/s | 90.8 KiB | 00m00s [ 8/95] Installing python3-pygments-0:2 100% | 258.2 MiB/s | 10.8 MiB | 00m00s [ 9/95] Installing python3-dateutil-1:2 100% | 218.0 MiB/s | 892.9 KiB | 00m00s [10/95] Installing python3-rfc3339-vali 100% | 12.0 MiB/s | 12.3 KiB | 00m00s [11/95] Installing python3-matplotlib-i 100% | 42.7 MiB/s | 43.7 KiB | 00m00s [12/95] Installing python3-rpds-py-0:0. 100% | 176.8 MiB/s | 724.2 KiB | 00m00s [13/95] Installing python3-attrs-0:24.3 100% | 133.8 MiB/s | 411.1 KiB | 00m00s [14/95] Installing python3-referencing- 100% | 109.3 MiB/s | 335.6 KiB | 00m00s [15/95] Installing python3-rfc3986-vali 100% | 15.6 MiB/s | 15.9 KiB | 00m00s [16/95] Installing python3-ptyprocess-0 100% | 82.0 MiB/s | 84.0 KiB | 00m00s [17/95] Installing python3-terminado-0: 100% | 123.2 MiB/s | 126.1 KiB | 00m00s [18/95] Installing python3-decorator-0: 100% | 79.2 MiB/s | 81.1 KiB | 00m00s [19/95] Installing python3-markupsafe-0 100% | 58.8 MiB/s | 60.2 KiB | 00m00s [20/95] Installing python3-jinja2-0:3.1 100% | 290.6 MiB/s | 2.9 MiB | 00m00s [21/95] Installing python-jupyter-files 100% | 0.0 B/s | 2.1 KiB | 00m00s [22/95] Installing python3-jupyter-serv 100% | 35.6 MiB/s | 72.9 KiB | 00m00s [23/95] Installing python3-prometheus_c 100% | 118.4 MiB/s | 363.6 KiB | 00m00s [24/95] Installing python3-pexpect-0:4. 100% | 155.9 MiB/s | 638.7 KiB | 00m00s [25/95] Installing python3-jsonschema-s 100% | 26.9 MiB/s | 55.1 KiB | 00m00s [26/95] Installing python3-jsonschema-0 100% | 212.5 MiB/s | 870.3 KiB | 00m00s [27/95] Installing python3-arrow-0:1.2. 100% | 184.0 MiB/s | 565.2 KiB | 00m00s [28/95] Installing python3-isoduration- 100% | 31.3 MiB/s | 64.1 KiB | 00m00s [29/95] Installing python3-jupyterlab_p 100% | 46.0 MiB/s | 47.1 KiB | 00m00s [30/95] Installing python3-tinycss2-0:1 100% | 125.7 MiB/s | 257.4 KiB | 00m00s [31/95] Installing python3-html5lib-1:1 100% | 252.3 MiB/s | 1.5 MiB | 00m00s [32/95] Installing python3-bleach-0:6.2 100% | 94.7 MiB/s | 193.9 KiB | 00m00s [33/95] Installing python3-urllib3-0:2. 100% | 200.3 MiB/s | 1.0 MiB | 00m00s [34/95] Installing python3-asttokens-0: 100% | 210.3 MiB/s | 215.3 KiB | 00m00s [35/95] Installing python3-comm-0:0.2.2 100% | 34.5 MiB/s | 35.3 KiB | 00m00s [36/95] Installing python3-iniconfig-0: 100% | 7.7 MiB/s | 23.6 KiB | 00m00s [37/95] Installing python3-pytest-0:8.3 100% | 411.9 MiB/s | 21.0 MiB | 00m00s [38/95] Installing python3-ply-0:3.11-2 100% | 280.0 MiB/s | 573.4 KiB | 00m00s [39/95] Installing python3-pycparser-0: 100% | 271.0 MiB/s | 832.5 KiB | 00m00s [40/95] Installing python3-cffi-0:1.17. 100% | 267.6 MiB/s | 1.3 MiB | 00m00s [41/95] Installing libxslt-0:1.1.42-2.f 100% | 158.3 MiB/s | 486.2 KiB | 00m00s [42/95] Installing python3-lxml-0:5.3.0 100% | 310.4 MiB/s | 5.0 MiB | 00m00s [43/95] Installing python3-pure-eval-0: 100% | 102.6 MiB/s | 105.0 KiB | 00m00s [44/95] Installing python3-executing-0: 100% | 263.9 MiB/s | 270.2 KiB | 00m00s [45/95] Installing python3-stack-data-0 100% | 208.5 MiB/s | 213.5 KiB | 00m00s [46/95] Installing python3-wcwidth-0:0. 100% | 184.0 MiB/s | 565.4 KiB | 00m00s [47/95] Installing python3-prompt-toolk 100% | 212.5 MiB/s | 3.8 MiB | 00m00s [48/95] Installing python3-parso-0:0.8. 100% | 111.3 MiB/s | 911.8 KiB | 00m00s [49/95] Installing python3-jedi-0:0.19. 100% | 92.5 MiB/s | 6.1 MiB | 00m00s [50/95] Installing python3-ipython-0:8. 100% | 232.1 MiB/s | 4.6 MiB | 00m00s [51/95] Installing libyaml-0:0.2.5-15.f 100% | 132.6 MiB/s | 135.8 KiB | 00m00s [52/95] Installing python3-pyyaml-0:6.0 100% | 196.5 MiB/s | 804.9 KiB | 00m00s [53/95] Installing python3-webcolors-0: 100% | 87.2 MiB/s | 89.3 KiB | 00m00s [54/95] Installing python3-uri-template 100% | 84.2 MiB/s | 86.2 KiB | 00m00s [55/95] Installing python3-jsonpointer- 100% | 47.3 MiB/s | 48.5 KiB | 00m00s [56/95] Installing python3-fqdn-0:1.5.1 100% | 23.3 MiB/s | 23.8 KiB | 00m00s [57/95] Installing python3-jsonschema+f 100% | 0.0 B/s | 124.0 B | 00m00s [58/95] Installing openpgm-0:5.2.122-35 100% | 294.5 MiB/s | 301.5 KiB | 00m00s [59/95] Installing libunwind-0:1.8.0-5. 100% | 177.9 MiB/s | 182.2 KiB | 00m00s [60/95] Installing libsodium-0:1.0.20-2 100% | 192.5 MiB/s | 394.2 KiB | 00m00s [61/95] Installing zeromq-0:4.3.5-17.fc 100% | 175.4 MiB/s | 897.9 KiB | 00m00s [62/95] Installing python3-pyzmq-0:26.2 100% | 162.6 MiB/s | 1.3 MiB | 00m00s [63/95] Installing python3-soupsieve-0: 100% | 146.8 MiB/s | 300.6 KiB | 00m00s [64/95] Installing python3-beautifulsou 100% | 286.1 MiB/s | 1.4 MiB | 00m00s [65/95] Installing libargon2-0:20190702 100% | 0.0 B/s | 50.1 KiB | 00m00s [66/95] Installing python3-argon2-cffi- 100% | 57.5 MiB/s | 58.9 KiB | 00m00s [67/95] Installing python3-argon2-cffi- 100% | 75.4 MiB/s | 77.2 KiB | 00m00s [68/95] Installing python3-json-logger- 100% | 32.3 MiB/s | 33.1 KiB | 00m00s [69/95] Installing python3-jupyter-even 100% | 49.3 MiB/s | 101.1 KiB | 00m00s [70/95] Installing python3-charset-norm 100% | 80.5 MiB/s | 329.8 KiB | 00m00s [71/95] Installing python3-setuptools-0 100% | 208.7 MiB/s | 8.6 MiB | 00m00s [72/95] Installing python3-fastjsonsche 100% | 96.2 MiB/s | 197.0 KiB | 00m00s [73/95] Installing python3-pandocfilter 100% | 39.9 MiB/s | 40.9 KiB | 00m00s [74/95] Installing python3-mistune-0:3. 100% | 110.0 MiB/s | 337.9 KiB | 00m00s [75/95] Installing python3-defusedxml-0 100% | 99.9 MiB/s | 204.6 KiB | 00m00s [76/95] Installing python3-psutil-0:5.9 100% | 361.7 MiB/s | 1.4 MiB | 00m00s [77/95] Installing python3-nest-asyncio 100% | 0.0 B/s | 27.8 KiB | 00m00s [78/95] Installing python3-sniffio-0:1. 100% | 39.5 MiB/s | 40.4 KiB | 00m00s [79/95] Installing python3-anyio-0:3.7. 100% | 213.8 MiB/s | 875.6 KiB | 00m00s [80/95] Installing python3-platformdirs 100% | 170.9 MiB/s | 175.0 KiB | 00m00s [81/95] Installing python3-jupyter-core 100% | 100.2 MiB/s | 205.3 KiB | 00m00s [82/95] Installing python3-jupyter-clie 100% | 179.7 MiB/s | 920.1 KiB | 00m00s [83/95] Installing python3-nbformat-0:5 100% | 139.1 MiB/s | 569.9 KiB | 00m00s [84/95] Installing python3-nbclient-0:0 100% | 109.4 MiB/s | 224.0 KiB | 00m00s [85/95] Installing python3-nbconvert-0: 100% | 125.0 MiB/s | 1.2 MiB | 00m00s [86/95] Installing python3-ipykernel-0: 100% | 160.0 MiB/s | 983.1 KiB | 00m00s [87/95] Installing python3-pytest-jupyt 100% | 86.4 MiB/s | 88.5 KiB | 00m00s [88/95] Installing python3-websocket-cl 100% | 150.0 MiB/s | 460.8 KiB | 00m00s [89/95] Installing python3-send2trash-0 100% | 25.7 MiB/s | 78.8 KiB | 00m00s [90/95] Installing python3-jupyter-serv 100% | 209.4 MiB/s | 2.9 MiB | 00m00s [91/95] Installing python3-pytest-jupyt 100% | 0.0 B/s | 124.0 B | 00m00s [92/95] Installing python3-pytest-conso 100% | 76.2 MiB/s | 78.0 KiB | 00m00s [93/95] Installing python3-requests-0:2 100% | 162.1 MiB/s | 498.0 KiB | 00m00s [94/95] Installing python3-pytest-timeo 100% | 80.9 MiB/s | 82.8 KiB | 00m00s [95/95] Installing python3-flaky-0:3.8. 100% | 3.8 MiB/s | 135.4 KiB | 00m00s Warning: skipped OpenPGP checks for 1 package from repository: copr_base Complete! Building target platforms: x86_64 Building for target x86_64 setting SOURCE_DATE_EPOCH=1721347200 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.yWivhT + umask 022 + cd /builddir/build/BUILD/python-jupyter-server-2.14.2-build + cd jupyter_server-2.14.2 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(packaging)' + echo 'python3dist(pip) >= 19' + '[' -f pyproject.toml ']' + echo '(python3dist(tomli) if python3-devel < 3.11)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + VALAFLAGS=-g + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + LT_SYS_LIBRARY_PATH=/usr/lib64: + CC=gcc + CXX=g++ + TMPDIR=/builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/.pyproject-builddir + RPM_TOXENV=py313 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/pyproject-wheeldir --output /builddir/build/BUILD/python-jupyter-server-2.14.2-build/python-jupyter-server-2.14.2-2.fc42.x86_64-pyproject-buildrequires -x test Handling hatchling >=1.11 from build-system.requires Requirement satisfied: hatchling >=1.11 (installed: hatchling 1.25.0) Handling hatch-jupyter-builder>=0.8.1 from get_requires_for_build_wheel Requirement satisfied: hatch-jupyter-builder>=0.8.1 (installed: hatch-jupyter-builder 0.9.0) Handling anyio>=3.1.0 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: anyio>=3.1.0 (installed: anyio 3.7.1) Handling argon2-cffi>=21.1 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: argon2-cffi>=21.1 (installed: argon2-cffi 23.1.0) Handling jinja2>=3.0.3 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: jinja2>=3.0.3 (installed: jinja2 3.1.4) Handling jupyter-client>=7.4.4 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: jupyter-client>=7.4.4 (installed: jupyter-client 8.6.1) Handling jupyter-core!=5.0.*,>=4.12 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: jupyter-core!=5.0.*,>=4.12 (installed: jupyter-core 5.7.2) Handling jupyter-events>=0.9.0 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: jupyter-events>=0.9.0 (installed: jupyter-events 0.11.0) Handling jupyter-server-terminals>=0.4.4 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: jupyter-server-terminals>=0.4.4 (installed: jupyter-server-terminals 0.5.3) Handling nbconvert>=6.4.4 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: nbconvert>=6.4.4 (installed: nbconvert 7.16.4) Handling nbformat>=5.3.0 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: nbformat>=5.3.0 (installed: nbformat 5.9.2) Handling packaging>=22.0 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: packaging>=22.0 (installed: packaging 24.2) Handling prometheus-client>=0.9 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: prometheus-client>=0.9 (installed: prometheus-client 0.21.0) Handling pywinpty>=2.0.1; os_name == 'nt' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: pywinpty>=2.0.1; os_name == 'nt' Handling pyzmq>=24 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: pyzmq>=24 (installed: pyzmq 26.2.0) Handling send2trash>=1.8.2 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: send2trash>=1.8.2 (installed: send2trash 1.8.2) Handling terminado>=0.8.3 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: terminado>=0.8.3 (installed: terminado 0.18.0) Handling tornado>=6.2.0 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: tornado>=6.2.0 (installed: tornado 6.4.1) Handling traitlets>=5.6.0 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: traitlets>=5.6.0 (installed: traitlets 5.14.3) Handling websocket-client>=1.7 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: websocket-client>=1.7 (installed: websocket-client 1.8.0) Handling ipykernel; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: ipykernel; extra == 'docs' Handling jinja2; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: jinja2; extra == 'docs' Handling jupyter-client; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: jupyter-client; extra == 'docs' Handling myst-parser; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: myst-parser; extra == 'docs' Handling nbformat; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: nbformat; extra == 'docs' Handling prometheus-client; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: prometheus-client; extra == 'docs' Handling pydata-sphinx-theme; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: pydata-sphinx-theme; extra == 'docs' Handling send2trash; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: send2trash; extra == 'docs' Handling sphinx-autodoc-typehints; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: sphinx-autodoc-typehints; extra == 'docs' Handling sphinxcontrib-github-alt; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: sphinxcontrib-github-alt; extra == 'docs' Handling sphinxcontrib-openapi>=0.8.0; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: sphinxcontrib-openapi>=0.8.0; extra == 'docs' Handling sphinxcontrib-spelling; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: sphinxcontrib-spelling; extra == 'docs' Handling sphinxemoji; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: sphinxemoji; extra == 'docs' Handling tornado; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: tornado; extra == 'docs' Handling typing-extensions; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: typing-extensions; extra == 'docs' Handling flaky; extra == 'test' from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: flaky; extra == 'test' (installed: flaky 3.8.1) Handling ipykernel; extra == 'test' from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: ipykernel; extra == 'test' (installed: ipykernel 6.29.3) Handling pytest-console-scripts; extra == 'test' from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: pytest-console-scripts; extra == 'test' (installed: pytest-console-scripts 1.4.1) Handling pytest-jupyter[server]>=0.7; extra == 'test' from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: pytest-jupyter[server]>=0.7; extra == 'test' (installed: pytest-jupyter 0.10.1) (extras are currently not checked) Handling pytest-timeout; extra == 'test' from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: pytest-timeout; extra == 'test' (installed: pytest-timeout 2.3.1) Handling pytest<9,>=7.0; extra == 'test' from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: pytest<9,>=7.0; extra == 'test' (installed: pytest 8.3.4) Handling requests; extra == 'test' from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: requests; extra == 'test' (installed: requests 2.32.3) + cat /builddir/build/BUILD/python-jupyter-server-2.14.2-build/python-jupyter-server-2.14.2-2.fc42.x86_64-pyproject-buildrequires + rm -rfv jupyter_server-2.14.2.dist-info/ removed 'jupyter_server-2.14.2.dist-info/METADATA' removed directory 'jupyter_server-2.14.2.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-jupyter-server-2.14.2-2.fc42.buildreqs.nosrc.rpm INFO: Going to install missing dynamic buildrequires Updating and loading repositories: Copr repository 100% | 100.8 KiB/s | 1.5 KiB | 00m00s fedora 100% | 104.6 KiB/s | 28.8 KiB | 00m00s Repositories loaded. Nothing to do. Package "pyproject-rpm-macros-1.16.3-1.fc42.noarch" is already installed. Package "python3-devel-3.13.1-2.fc42.x86_64" is already installed. Package "python3-anyio-3.7.1-5.fc41.noarch" is already installed. Package "python3-argon2-cffi-23.1.0-3.fc41.noarch" is already installed. Package "python3-flaky-3.8.1-3.fc41.noarch" is already installed. Package "python3-hatch-jupyter-builder-0.9.0-3.fc41.noarch" is already installed. Package "python3-hatchling-1.25.0-1.fc42.noarch" is already installed. Package "python3-ipykernel-6.29.3-8.fc42.noarch" is already installed. Package "python3-jinja2-3.1.4-5.fc41.noarch" is already installed. Package "python3-jupyter-client-8.6.1-10.fc42.noarch" is already installed. Package "python3-jupyter-events-0.11.0-1.fc42.noarch" is already installed. Package "python3-jupyter-server-terminals-0.5.3-4.fc41.noarch" is already installed. Package "python3-nbconvert-7.16.4-4.fc41.noarch" is already installed. Package "python3-nbformat-5.9.2-5.fc41.noarch" is already installed. Package "python3-packaging-24.2-2.fc42.noarch" is already installed. Package "python3-packaging-24.2-2.fc42.noarch" is already installed. Package "python3-pip-24.3.1-1.fc42.noarch" is already installed. Package "python3-prometheus_client-0.21.0-1.fc42.noarch" is already installed. Package "python3-pytest-console-scripts-1.4.1-7.fc41.noarch" is already installed. Package "python3-pytest-jupyter-0.10.1-4.fc41.noarch" is already installed. Package "python3-pytest-jupyter+server-0.10.1-4.fc41.noarch" is already installed. Package "python3-pytest-timeout-2.3.1-4.fc41.noarch" is already installed. Package "python3-pyzmq-26.2.0-3.fc42.x86_64" is already installed. Package "python3-requests-2.32.3-3.fc41.noarch" is already installed. Package "python3-send2trash-1.8.2-8.fc41.noarch" is already installed. Package "python3-terminado-0.18.0-6.fc41.noarch" is already installed. Package "python3-tornado-6.4.1-1.fc42.x86_64" is already installed. Package "python3-traitlets-5.14.3-3.fc41.noarch" is already installed. Package "python3-websocket-client-1.8.0-2.fc42.noarch" is already installed. Building target platforms: x86_64 Building for target x86_64 setting SOURCE_DATE_EPOCH=1721347200 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.Eb88KO + umask 022 + cd /builddir/build/BUILD/python-jupyter-server-2.14.2-build + cd jupyter_server-2.14.2 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(packaging)' + echo 'python3dist(pip) >= 19' + '[' -f pyproject.toml ']' + echo '(python3dist(tomli) if python3-devel < 3.11)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + VALAFLAGS=-g + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + LT_SYS_LIBRARY_PATH=/usr/lib64: + CC=gcc + CXX=g++ + TMPDIR=/builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/.pyproject-builddir + RPM_TOXENV=py313 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/pyproject-wheeldir --output /builddir/build/BUILD/python-jupyter-server-2.14.2-build/python-jupyter-server-2.14.2-2.fc42.x86_64-pyproject-buildrequires -x test Handling hatchling >=1.11 from build-system.requires Requirement satisfied: hatchling >=1.11 (installed: hatchling 1.25.0) Handling hatch-jupyter-builder>=0.8.1 from get_requires_for_build_wheel Requirement satisfied: hatch-jupyter-builder>=0.8.1 (installed: hatch-jupyter-builder 0.9.0) Handling anyio>=3.1.0 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: anyio>=3.1.0 (installed: anyio 3.7.1) Handling argon2-cffi>=21.1 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: argon2-cffi>=21.1 (installed: argon2-cffi 23.1.0) Handling jinja2>=3.0.3 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: jinja2>=3.0.3 (installed: jinja2 3.1.4) Handling jupyter-client>=7.4.4 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: jupyter-client>=7.4.4 (installed: jupyter-client 8.6.1) Handling jupyter-core!=5.0.*,>=4.12 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: jupyter-core!=5.0.*,>=4.12 (installed: jupyter-core 5.7.2) Handling jupyter-events>=0.9.0 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: jupyter-events>=0.9.0 (installed: jupyter-events 0.11.0) Handling jupyter-server-terminals>=0.4.4 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: jupyter-server-terminals>=0.4.4 (installed: jupyter-server-terminals 0.5.3) Handling nbconvert>=6.4.4 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: nbconvert>=6.4.4 (installed: nbconvert 7.16.4) Handling nbformat>=5.3.0 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: nbformat>=5.3.0 (installed: nbformat 5.9.2) Handling packaging>=22.0 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: packaging>=22.0 (installed: packaging 24.2) Handling prometheus-client>=0.9 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: prometheus-client>=0.9 (installed: prometheus-client 0.21.0) Handling pywinpty>=2.0.1; os_name == 'nt' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: pywinpty>=2.0.1; os_name == 'nt' Handling pyzmq>=24 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: pyzmq>=24 (installed: pyzmq 26.2.0) Handling send2trash>=1.8.2 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: send2trash>=1.8.2 (installed: send2trash 1.8.2) Handling terminado>=0.8.3 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: terminado>=0.8.3 (installed: terminado 0.18.0) Handling tornado>=6.2.0 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: tornado>=6.2.0 (installed: tornado 6.4.1) Handling traitlets>=5.6.0 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: traitlets>=5.6.0 (installed: traitlets 5.14.3) Handling websocket-client>=1.7 from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: websocket-client>=1.7 (installed: websocket-client 1.8.0) Handling ipykernel; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: ipykernel; extra == 'docs' Handling jinja2; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: jinja2; extra == 'docs' Handling jupyter-client; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: jupyter-client; extra == 'docs' Handling myst-parser; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: myst-parser; extra == 'docs' Handling nbformat; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: nbformat; extra == 'docs' Handling prometheus-client; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: prometheus-client; extra == 'docs' Handling pydata-sphinx-theme; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: pydata-sphinx-theme; extra == 'docs' Handling send2trash; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: send2trash; extra == 'docs' Handling sphinx-autodoc-typehints; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: sphinx-autodoc-typehints; extra == 'docs' Handling sphinxcontrib-github-alt; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: sphinxcontrib-github-alt; extra == 'docs' Handling sphinxcontrib-openapi>=0.8.0; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: sphinxcontrib-openapi>=0.8.0; extra == 'docs' Handling sphinxcontrib-spelling; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: sphinxcontrib-spelling; extra == 'docs' Handling sphinxemoji; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: sphinxemoji; extra == 'docs' Handling tornado; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: tornado; extra == 'docs' Handling typing-extensions; extra == 'docs' from hook generated metadata: Requires-Dist (jupyter_server) Ignoring alien requirement: typing-extensions; extra == 'docs' Handling flaky; extra == 'test' from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: flaky; extra == 'test' (installed: flaky 3.8.1) Handling ipykernel; extra == 'test' from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: ipykernel; extra == 'test' (installed: ipykernel 6.29.3) Handling pytest-console-scripts; extra == 'test' from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: pytest-console-scripts; extra == 'test' (installed: pytest-console-scripts 1.4.1) Handling pytest-jupyter[server]>=0.7; extra == 'test' from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: pytest-jupyter[server]>=0.7; extra == 'test' (installed: pytest-jupyter 0.10.1) (extras are currently not checked) Handling pytest-timeout; extra == 'test' from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: pytest-timeout; extra == 'test' (installed: pytest-timeout 2.3.1) Handling pytest<9,>=7.0; extra == 'test' from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: pytest<9,>=7.0; extra == 'test' (installed: pytest 8.3.4) Handling requests; extra == 'test' from hook generated metadata: Requires-Dist (jupyter_server) Requirement satisfied: requests; extra == 'test' (installed: requests 2.32.3) + cat /builddir/build/BUILD/python-jupyter-server-2.14.2-build/python-jupyter-server-2.14.2-2.fc42.x86_64-pyproject-buildrequires + rm -rfv jupyter_server-2.14.2.dist-info/ removed 'jupyter_server-2.14.2.dist-info/METADATA' removed directory 'jupyter_server-2.14.2.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.XTM3QI + umask 022 + cd /builddir/build/BUILD/python-jupyter-server-2.14.2-build + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib64: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd jupyter_server-2.14.2 + mkdir -p /builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/.pyproject-builddir + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + VALAFLAGS=-g + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes --cap-lints=warn' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes ' + LT_SYS_LIBRARY_PATH=/usr/lib64: + CC=gcc + CXX=g++ + TMPDIR=/builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/.pyproject-builddir + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_wheel.py /builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/pyproject-wheeldir Processing /builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2 Preparing metadata (pyproject.toml): started Running command Preparing metadata (pyproject.toml) INFO:hatch_jupyter_builder.utils:Running jupyter-builder INFO:hatch_jupyter_builder.utils:Skip-if-exists file(s) found INFO:hatch_jupyter_builder.utils:Skipping build INFO:hatch_jupyter_builder.utils:Ensured target(s) exist! INFO:hatch_jupyter_builder.utils:Finished running jupyter-builder Preparing metadata (pyproject.toml): finished with status 'done' Building wheels for collected packages: jupyter_server Building wheel for jupyter_server (pyproject.toml): started Running command Building wheel for jupyter_server (pyproject.toml) Building wheel for jupyter_server (pyproject.toml): finished with status 'done' Created wheel for jupyter_server: filename=jupyter_server-2.14.2-py3-none-any.whl size=382600 sha256=0e88d52bbb769b8a7c3a527471d3ba58165e6c11a45b9e58e80951df718d970e Stored in directory: /builddir/.cache/pip/wheels/bf/41/e3/ae01ce99bc18ccc0716f19997b1007e496f410ac9a2cb90071 Successfully built jupyter_server + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.mRC4Jy + umask 022 + cd /builddir/build/BUILD/python-jupyter-server-2.14.2-build + '[' /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT '!=' / ']' + rm -rf /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT ++ dirname /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT + mkdir -p /builddir/build/BUILD/python-jupyter-server-2.14.2-build + mkdir /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib64: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd jupyter_server-2.14.2 ++ ls /builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/pyproject-wheeldir/jupyter_server-2.14.2-py3-none-any.whl ++ xargs basename --multiple ++ sed -E 's/([^-]+)-([^-]+)-.+\.whl/\1==\2/' + specifier=jupyter_server==2.14.2 + '[' -z jupyter_server==2.14.2 ']' + TMPDIR=/builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/.pyproject-builddir + /usr/bin/python3 -m pip install --root /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT --prefix /usr --no-deps --disable-pip-version-check --progress-bar off --verbose --ignore-installed --no-warn-script-location --no-index --no-cache-dir --find-links /builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/pyproject-wheeldir jupyter_server==2.14.2 Using pip 24.3.1 from /usr/lib/python3.13/site-packages/pip (python 3.13) Looking in links: /builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/pyproject-wheeldir Processing ./pyproject-wheeldir/jupyter_server-2.14.2-py3-none-any.whl Installing collected packages: jupyter_server Creating /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/bin changing mode of /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/bin/jupyter-server to 755 Successfully installed jupyter_server-2.14.2 + '[' -d /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/bin ']' + '[' -z sP ']' + shebang_flags=-kasP + /usr/bin/python3 -B /usr/lib/rpm/redhat/pathfix.py -pni /usr/bin/python3 -kasP /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/bin/jupyter-server /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/bin/jupyter-server: updating + rm -rfv /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/bin/__pycache__ + rm -f /builddir/build/BUILD/python-jupyter-server-2.14.2-build/python-jupyter-server-2.14.2-2.fc42.x86_64-pyproject-ghost-distinfo + site_dirs=() + '[' -d /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages ']' + site_dirs+=("/usr/lib/python3.13/site-packages") + '[' /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib64/python3.13/site-packages '!=' /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages ']' + '[' -d /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib64/python3.13/site-packages ']' + for site_dir in ${site_dirs[@]} + for distinfo in /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT$site_dir/*.dist-info + echo '%ghost /usr/lib/python3.13/site-packages/jupyter_server-2.14.2.dist-info' + sed -i s/pip/rpm/ /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server-2.14.2.dist-info/INSTALLER + PYTHONPATH=/usr/lib/rpm/redhat + /usr/bin/python3 -B /usr/lib/rpm/redhat/pyproject_preprocess_record.py --buildroot /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT --record /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server-2.14.2.dist-info/RECORD --output /builddir/build/BUILD/python-jupyter-server-2.14.2-build/python-jupyter-server-2.14.2-2.fc42.x86_64-pyproject-record + rm -fv /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server-2.14.2.dist-info/RECORD removed '/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server-2.14.2.dist-info/RECORD' + rm -fv /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server-2.14.2.dist-info/REQUESTED removed '/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server-2.14.2.dist-info/REQUESTED' ++ wc -l /builddir/build/BUILD/python-jupyter-server-2.14.2-build/python-jupyter-server-2.14.2-2.fc42.x86_64-pyproject-ghost-distinfo ++ cut -f1 '-d ' + lines=1 + '[' 1 -ne 1 ']' + RPM_FILES_ESCAPE=4.19 + /usr/bin/python3 /usr/lib/rpm/redhat/pyproject_save_files.py --output-files /builddir/build/BUILD/python-jupyter-server-2.14.2-build/python-jupyter-server-2.14.2-2.fc42.x86_64-pyproject-files --output-modules /builddir/build/BUILD/python-jupyter-server-2.14.2-build/python-jupyter-server-2.14.2-2.fc42.x86_64-pyproject-modules --buildroot /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT --sitelib /usr/lib/python3.13/site-packages --sitearch /usr/lib64/python3.13/site-packages --python-version 3.13 --pyproject-record /builddir/build/BUILD/python-jupyter-server-2.14.2-build/python-jupyter-server-2.14.2-2.fc42.x86_64-pyproject-record --prefix /usr jupyter_server + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip /usr/bin/strip + /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump + /usr/lib/rpm/redhat/brp-strip-lto /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/check-rpaths + /usr/lib/rpm/redhat/brp-mangle-shebangs + /usr/lib/rpm/brp-remove-la-files + env /usr/lib/rpm/redhat/brp-python-bytecompile '' 1 0 -j4 Bytecompiling .py files below /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13 using python3.13 + /usr/lib/rpm/redhat/brp-python-hardlink + /usr/bin/add-determinism --brp -j4 /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/auth/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/auth/__pycache__/__main__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/auth/__pycache__/authorizer.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/auth/__pycache__/decorator.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/auth/__pycache__/logout.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/auth/__pycache__/utils.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/auth/__pycache__/security.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/base/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/base/__pycache__/call_context.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/auth/__pycache__/login.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/base/__pycache__/zmqhandlers.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/base/__pycache__/websocket.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/extension/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/auth/__pycache__/identity.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/extension/__pycache__/config.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/extension/__pycache__/handler.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/extension/__pycache__/application.cpython-313.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/extension/__pycache__/serverextension.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/extension/__pycache__/manager.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/extension/__pycache__/utils.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/files/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/files/__pycache__/handlers.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/gateway/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/base/__pycache__/handlers.cpython-313.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/extension/__pycache__/application.cpython-313.opt-1.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/gateway/__pycache__/connections.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/base/__pycache__/handlers.cpython-313.opt-1.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/gateway/__pycache__/handlers.cpython-313.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/gateway/__pycache__/gateway_client.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/gateway/__pycache__/handlers.cpython-313.opt-1.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/i18n/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/kernelspecs/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/nbconvert/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/kernelspecs/__pycache__/handlers.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/nbconvert/__pycache__/handlers.cpython-313.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/prometheus/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/prometheus/__pycache__/log_functions.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/nbconvert/__pycache__/handlers.cpython-313.opt-1.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/api/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/prometheus/__pycache__/metrics.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/config/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/config/__pycache__/handlers.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/api/__pycache__/handlers.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/config/__pycache__/manager.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/gateway/__pycache__/managers.cpython-313.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/__pycache__/checkpoints.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/gateway/__pycache__/managers.cpython-313.opt-1.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/__pycache__/filecheckpoints.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/__pycache__/fileio.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/__pycache__/largefilemanager.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/__pycache__/manager.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/__pycache__/filemanager.cpython-313.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/events/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernels/connection/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernels/connection/__pycache__/abc.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/events/__pycache__/handlers.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/__pycache__/handlers.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernels/connection/__pycache__/base.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernels/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/__pycache__/filemanager.cpython-313.opt-1.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernels/__pycache__/handlers.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernels/__pycache__/websocket.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernels/connection/__pycache__/channels.cpython-313.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernels/connection/__pycache__/channels.cpython-313.opt-1.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernelspecs/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/nbconvert/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/nbconvert/__pycache__/handlers.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernelspecs/__pycache__/handlers.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/security/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/sessions/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/security/__pycache__/handlers.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/sessions/__pycache__/handlers.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernels/__pycache__/kernelmanager.cpython-313.opt-1.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernels/__pycache__/kernelmanager.cpython-313.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/__pycache__/shutdown.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/sessions/__pycache__/sessionmanager.cpython-313.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/sessions/__pycache__/sessionmanager.cpython-313.opt-1.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/terminal/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/terminal/__pycache__/api_handlers.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/terminal/__pycache__/handlers.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/terminal/__pycache__/terminalmanager.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/view/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/__pycache__/__init__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/view/__pycache__/handlers.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/__pycache__/__main__.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/__pycache__/_sysinfo.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/__pycache__/_tz.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/__pycache__/_version.cpython-313.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/__pycache__/pytest_plugin.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/__pycache__/log.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/__pycache__/config_manager.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/__pycache__/transutils.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/__pycache__/traittypes.cpython-313.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/__pycache__/_version.cpython-313.opt-1.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/__pycache__/utils.cpython-313.pyc: rewriting with normalized contents /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/__pycache__/traittypes.cpython-313.opt-1.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/__pycache__/serverapp.cpython-313.pyc: replacing with normalized version /builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/__pycache__/serverapp.cpython-313.opt-1.pyc: replacing with normalized version Scanned 65 directories and 305 files, processed 108 inodes, 100 modified (24 replaced + 76 rewritten), 0 unsupported format, 0 errors Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.hQsJbw + umask 022 + cd /builddir/build/BUILD/python-jupyter-server-2.14.2-build + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib64: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd jupyter_server-2.14.2 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes ' + PATH=/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib64/python3.13/site-packages:/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages + PYTHONDONTWRITEBYTECODE=1 + PYTEST_ADDOPTS=' --ignore=/builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2/.pyproject-builddir' + PYTEST_XDIST_AUTO_NUM_WORKERS=4 + /usr/bin/pytest -vv -W 'always:unclosed -http://127.0.0.1:9999/?token=-http://localhost:9999/] PASSED [ 88%] tests/test_serverapp.py::test_urls[config2-http://1.1.1.1:8888/?token=-http://127.0.0.1:8888/?token=-http://1.1.1.1:8888/] PASSED [ 88%] tests/test_serverapp.py::test_urls[config3-https://localhost:8888/?token=-https://127.0.0.1:8888/?token=-https://localhost:8888/] PASSED [ 88%] tests/test_serverapp.py::test_urls[config4-http://test.org/?token=-http://127.0.0.1:9999/?token=-http://localhost:9999/] PASSED [ 88%] tests/test_serverapp.py::test_urls[config5-http://localhost:8888/test/?token=-http://127.0.0.1:8888/test/?token=-http://localhost:8888/] PASSED [ 88%] tests/test_serverapp.py::test_urls[config6-http+unix://%2Ftmp%2Fjp-test.sock/?token=-http+unix://%2Ftmp%2Fjp-test.sock/?token=-http+unix://%2Ftmp%2Fjp-test.sock/] PASSED [ 88%] tests/test_serverapp.py::test_urls[config7-http+unix://%2Ftmp%2Fjp-test.sock/test/?token=-http+unix://%2Ftmp%2Fjp-test.sock/test/?token=-http+unix://%2Ftmp%2Fjp-test.sock/] PASSED [ 88%] tests/test_serverapp.py::test_urls[config8-http://localhost:8888/?token=-http://127.0.0.1:8888/?token=-http://localhost:8888/] PASSED [ 88%] tests/test_serverapp.py::test_valid_preferred_dir FAILED [ 89%] tests/test_serverapp.py::test_valid_preferred_dir_is_root_subdir FAILED [ 89%] tests/test_serverapp.py::test_valid_preferred_dir_does_not_exist PASSED [ 89%] tests/test_serverapp.py::test_preferred_dir_validation_sync_regression[FileContentsManager] FAILED [ 89%] tests/test_serverapp.py::test_preferred_dir_validation_sync_regression[AsyncFileContentsManager] FAILED [ 89%] tests/test_serverapp.py::test_preferred_dir_validation[cli-cli-ServerApp] FAILED [ 89%] tests/test_serverapp.py::test_preferred_dir_validation[cli-cli-FileContentsManager] FAILED [ 89%] tests/test_serverapp.py::test_preferred_dir_validation[cli-config-ServerApp] FAILED [ 89%] tests/test_serverapp.py::test_preferred_dir_validation[cli-config-FileContentsManager] FAILED [ 89%] tests/test_serverapp.py::test_preferred_dir_validation[cli-default-ServerApp] FAILED [ 89%] tests/test_serverapp.py::test_preferred_dir_validation[cli-default-FileContentsManager] FAILED [ 90%] tests/test_serverapp.py::test_preferred_dir_validation[config-cli-ServerApp] FAILED [ 90%] tests/test_serverapp.py::test_preferred_dir_validation[config-cli-FileContentsManager] FAILED [ 90%] tests/test_serverapp.py::test_preferred_dir_validation[config-config-ServerApp] FAILED [ 90%] tests/test_serverapp.py::test_preferred_dir_validation[config-config-FileContentsManager] FAILED [ 90%] tests/test_serverapp.py::test_preferred_dir_validation[config-default-ServerApp] FAILED [ 90%] tests/test_serverapp.py::test_preferred_dir_validation[config-default-FileContentsManager] FAILED [ 90%] tests/test_serverapp.py::test_preferred_dir_validation[default-cli-ServerApp] FAILED [ 90%] tests/test_serverapp.py::test_preferred_dir_validation[default-cli-FileContentsManager] FAILED [ 90%] tests/test_serverapp.py::test_preferred_dir_validation[default-config-ServerApp] FAILED [ 90%] tests/test_serverapp.py::test_preferred_dir_validation[default-config-FileContentsManager] FAILED [ 91%] tests/test_serverapp.py::test_preferred_dir_validation[default-default-ServerApp] FAILED [ 91%] tests/test_serverapp.py::test_preferred_dir_validation[default-default-FileContentsManager] FAILED [ 91%] tests/test_serverapp.py::test_invalid_preferred_dir_does_not_exist PASSED [ 91%] tests/test_serverapp.py::test_invalid_preferred_dir_does_not_exist_set FAILED [ 91%] tests/test_serverapp.py::test_invalid_preferred_dir_not_root_subdir FAILED [ 91%] tests/test_serverapp.py::test_invalid_preferred_dir_not_root_subdir_set FAILED [ 91%] tests/test_serverapp.py::test_absolute_preferred_dir_not_root_subdir_set FAILED [ 91%] tests/test_serverapp.py::test_random_ports PASSED [ 91%] tests/test_serverapp.py::test_server_web_application ERROR [ 91%] tests/test_serverapp.py::test_misc ERROR [ 92%] tests/test_serverapp.py::test_deprecated_props ERROR [ 92%] tests/test_serverapp.py::test_signals ERROR [ 92%] tests/test_serverapp.py::test_shutdown_no_activity ERROR [ 92%] tests/test_serverapp.py::test_running_server_info ERROR [ 92%] tests/test_serverapp.py::test_browser_open_files[True] FAILED [ 92%] tests/test_serverapp.py::test_browser_open_files[False] FAILED [ 92%] tests/test_serverapp.py::test_deprecated_notebook_dir_priority FAILED [ 92%] tests/test_serverapp.py::test_immutable_cache_trait PASSED [ 92%] tests/test_serverapp.py::test PASSED [ 92%] tests/test_serverapp.py::test_tornado_authentication_detection[test-False0] PASSED [ 93%] tests/test_serverapp.py::test_tornado_authentication_detection[test-False1] PASSED [ 93%] tests/test_serverapp.py::test_tornado_authentication_detection[test-False2] PASSED [ 93%] tests/test_serverapp.py::test_tornado_authentication_detection[test-True0] PASSED [ 93%] tests/test_serverapp.py::test_tornado_authentication_detection[test-True1] PASSED [ 93%] tests/test_serverapp.py::test_tornado_authentication_detection[test-False3] PASSED [ 93%] tests/test_terminal.py::test_no_terminals ERROR [ 93%] tests/test_terminal.py::test_terminal_create ERROR [ 93%] tests/test_terminal.py::test_terminal_create_with_kwargs ERROR [ 93%] tests/test_terminal.py::test_terminal_create_with_cwd ERROR [ 93%] tests/test_terminal.py::test_terminal_create_with_relative_cwd SKIPPED [ 94%] tests/test_terminal.py::test_terminal_create_with_bad_cwd SKIPPED (Not yet working) [ 94%] tests/test_terminal.py::test_culling_config FAILED [ 94%] tests/test_terminal.py::test_culling ERROR [ 94%] tests/test_terminal.py::test_shell_command_override[shell_command="['/path/to/shell', '-l']"-expected_shell0-5.4] FAILED [ 94%] tests/test_terminal.py::test_shell_command_override[shell_command="/string/path/to/shell -l"-expected_shell1-5.1] FAILED [ 94%] tests/test_terminal.py::test_importing_shims PASSED [ 94%] tests/test_traittypes.py::TestInstanceFromClasses::test_good_values[1] PASSED [ 94%] tests/test_traittypes.py::TestInstanceFromClasses::test_good_values[test] PASSED [ 94%] tests/test_traittypes.py::TestInstanceFromClasses::test_good_values[value2] PASSED [ 94%] tests/test_traittypes.py::TestInstanceFromClasses::test_bad_values[2.4] PASSED [ 95%] tests/test_traittypes.py::TestInstanceFromClasses::test_bad_values[value1] PASSED [ 95%] tests/test_traittypes.py::TestTypeFromClasses::test_good_values[DummyClass] PASSED [ 95%] tests/test_traittypes.py::TestTypeFromClasses::test_good_values[DummyInt] PASSED [ 95%] tests/test_traittypes.py::TestTypeFromClasses::test_good_values[LargeFileManager] PASSED [ 95%] tests/test_traittypes.py::TestTypeFromClasses::test_good_values[jupyter_server.services.contents.manager.ContentsManager] PASSED [ 95%] tests/test_traittypes.py::TestTypeFromClasses::test_bad_values[float] PASSED [ 95%] tests/test_traittypes.py::TestTypeFromClasses::test_bad_values[object] PASSED [ 95%] tests/test_utils.py::test_help_output PASSED [ 95%] tests/test_utils.py::test_url_escaping[/this is a test/for spaces/-/this%20is%20a%20test/for%20spaces/] PASSED [ 95%] tests/test_utils.py::test_url_escaping[notebook with space.ipynb-notebook%20with%20space.ipynb] PASSED [ 96%] tests/test_utils.py::test_url_escaping[/path with a/notebook and space.ipynb-/path%20with%20a/notebook%20and%20space.ipynb] PASSED [ 96%] tests/test_utils.py::test_url_escaping[/ !@$#%^&* / test %^ notebook @#$ name.ipynb-/%20%21%40%24%23%25%5E%26%2A%20/%20test%20%25%5E%20notebook%20%40%23%24%20name.ipynb] PASSED [ 96%] tests/test_utils.py::test_is_namespace_package[test_namespace-True] PASSED [ 96%] tests/test_utils.py::test_is_namespace_package[sys-False] PASSED [ 96%] tests/test_utils.py::test_is_namespace_package[jupyter_server-False] PASSED [ 96%] tests/test_utils.py::test_is_namespace_package[not_a_python_namespace-None] PASSED [ 96%] tests/test_utils.py::test_is_namespace_package_no_spec PASSED [ 96%] tests/test_utils.py::test_path_utils PASSED [ 96%] tests/test_utils.py::test_check_version PASSED [ 96%] tests/test_utils.py::test_check_pid PASSED [ 97%] tests/test_utils.py::test_run_sync_in_loop PASSED [ 97%] tests/test_utils.py::test_unix_socket_in_use PASSED [ 97%] tests/test_utils.py::test_filefind[/foo-OSError] PASSED [ 97%] tests/test_utils.py::test_filefind[../c/in-c-OSError] PASSED [ 97%] tests/test_utils.py::test_filefind[in-a-a/in-a] PASSED [ 97%] tests/test_utils.py::test_filefind[in-b-b/in-b] PASSED [ 97%] tests/test_utils.py::test_filefind[in-both-a/in-both] PASSED [ 97%] tests/test_utils.py::test_filefind[\\in-a-OSError] PASSED [ 97%] tests/test_utils.py::test_filefind[not-found-OSError] PASSED [ 97%] tests/test_version.py::test_invalid_pep440_versions[4.1.0.b1] PASSED [ 98%] tests/test_version.py::test_invalid_pep440_versions[4.1.b1] PASSED [ 98%] tests/test_version.py::test_invalid_pep440_versions[4.2] PASSED [ 98%] tests/test_version.py::test_invalid_pep440_versions[X.y.z] PASSED [ 98%] tests/test_version.py::test_invalid_pep440_versions[1.2.3.dev1.post2] PASSED [ 98%] tests/test_version.py::test_valid_pep440_versions[4.1.1] PASSED [ 98%] tests/test_version.py::test_valid_pep440_versions[4.2.1b3] PASSED [ 98%] tests/test_version.py::test_current_version PASSED [ 98%] tests/test_view.py::test_view[False-nosuchfile.html] ERROR [ 98%] tests/test_view.py::test_view[False-nosuchfile.bin] ERROR [ 98%] tests/test_view.py::test_view[True-exists.html] ERROR [ 99%] tests/test_view.py::test_view[True-exists.bin] ERROR [ 99%] tests/unix_sockets/test_api.py::test_get_spec ERROR [ 99%] tests/unix_sockets/test_api.py::test_list_running_servers ERROR [ 99%] tests/unix_sockets/test_serverapp_integration.py::test_shutdown_sock_server_integration SKIPPEDtion tests using the `--integration_tests` flag.) [ 99%] tests/unix_sockets/test_serverapp_integration.py::test_sock_server_validate_sockmode_type SKIPPEDtion tests using the `--integration_tests` flag.) [ 99%] tests/unix_sockets/test_serverapp_integration.py::test_sock_server_validate_sockmode_accessible SKIPPEDtion tests using the `--integration_tests` flag.) [ 99%] tests/unix_sockets/test_serverapp_integration.py::test_stop_multi_integration SKIPPEDtion tests using the `--integration_tests` flag.) [ 99%] tests/unix_sockets/test_serverapp_integration.py::test_launch_socket_collision SKIPPEDtion tests using the `--integration_tests` flag.) [ 99%] tests/unix_sockets/test_serverapp_integration.py::test_shutdown_server SKIPPEDtion tests using the `--integration_tests` flag.) [ 99%] tests/unix_sockets/test_serverapp_integration.py::test_jupyter_server_apps SKIPPEDtion tests using the `--integration_tests` flag.) [100%] ==================================== ERRORS ==================================== ___ ERROR at setup of test_authorized_requests[True-GET-/view/{nbpath}-None] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd9ab9c0> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'd12f0a28' environ = None http_port = 46829 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd9abb00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46829 jp_logging_stream = <_io.StringIO object at 0x7f21bd32b400> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd47fe00> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:18.206 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_0/config/jupyter_server_config.json ___ ERROR at setup of test_authorized_requests[True-GET-/api/contents-None] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bdabe700> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'aa9f9cc6' environ = None http_port = 40283 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bdabf740> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40283 jp_logging_stream = <_io.StringIO object at 0x7f21bd8da2c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bda734d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:18.333 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_1/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[True-POST-/api/contents-{"type": "directory"}] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd5784a0> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'e350aa45' environ = None http_port = 44931 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd5785e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44931 jp_logging_stream = <_io.StringIO object at 0x7f21bd8d9cc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd560550> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:18.426 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_2/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[True-PUT-/api/contents/foo-{"type": "directory"}] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd578e00> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '2ea2e328' environ = None http_port = 36363 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd578ae0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36363 jp_logging_stream = <_io.StringIO object at 0x7f21bd8d9c00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd5c1480> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:18.525 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_3/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[True-PATCH-/api/contents/{nbpath}-{"path": "/newpath"}] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd57a840> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'd0fae3e7' environ = None http_port = 46149 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd579440> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46149 jp_logging_stream = <_io.StringIO object at 0x7f21bd8da8c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd5c3950> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:18.618 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_4/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[True-DELETE-/api/contents/{nbpath}-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bdab4a40> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '53f25eac' environ = None http_port = 33073 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd578f40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33073 jp_logging_stream = <_io.StringIO object at 0x7f21bd8db040> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd8dec30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:18.712 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_5/config/jupyter_server_config.json ____ ERROR at setup of test_authorized_requests[True-GET-/api/kernels-None] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd57b420> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '7c2fbfe2' environ = None http_port = 38807 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd579ee0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38807 jp_logging_stream = <_io.StringIO object at 0x7f21bd8dad40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_6/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_6/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_6') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd5847c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:18.804 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_6/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[True-GET-/api/kernels/{kernel_id}-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd57aa20> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'f31905a5' environ = None http_port = 44453 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd57ac00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44453 jp_logging_stream = <_io.StringIO object at 0x7f21bd568580> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_7/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_7/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd5857b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:18.897 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_7/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[True-GET-/api/kernels/{kernel_id}/channels-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd57bc40> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '0007c25c' environ = None http_port = 45277 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd6f80e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45277 jp_logging_stream = <_io.StringIO object at 0x7f21bd569600> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_8/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_8/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_8') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd7b8c50> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:19.000 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_8/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_8/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_8/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_8/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_8/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_8/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[True-POST-/api/kernels/{kernel_id}/interrupt-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd6f8680> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'a4e5a7bf' environ = None http_port = 33467 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd6f8720> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33467 jp_logging_stream = <_io.StringIO object at 0x7f21bd568040> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_9/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_9/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_9') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd7b9f50> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:19.093 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_9/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_9/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_9/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_9/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_9/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_9/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[True-POST-/api/kernels/{kernel_id}/restart-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd57aca0> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '41114489' environ = None http_port = 41175 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd6f8e00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41175 jp_logging_stream = <_io.StringIO object at 0x7f21bd568640> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_10/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_10/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_10') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd5123f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:19.248 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_10/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_10/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_10/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_10/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_10/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_10/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[True-DELETE-/api/kernels/{kernel_id}-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd6fab60> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '7d5f896b' environ = None http_port = 45675 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd6fafc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45675 jp_logging_stream = <_io.StringIO object at 0x7f21bd56a500> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_11/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_11/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_11') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd7bc050> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:19.341 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_11/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_11/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_11/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_11/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_11/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_11/config/jupyter_server_config.json ___ ERROR at setup of test_authorized_requests[True-POST-/api/kernels-None] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd6fb920> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'f9c49d1d' environ = None http_port = 45531 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd6fa5c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45531 jp_logging_stream = <_io.StringIO object at 0x7f21bd569cc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_12/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_12/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_12') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bde16190> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:19.436 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_12/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_12/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_12/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_12/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_12/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_12/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_12/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_12/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_12/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_12/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_12/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_12/config/jupyter_server_config.json __ ERROR at setup of test_authorized_requests[True-GET-/api/kernelspecs-None] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd6fa700> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'ebc086e2' environ = None http_port = 36687 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd6f96c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36687 jp_logging_stream = <_io.StringIO object at 0x7f21bd56a380> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_13/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_13/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_13') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc914750> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:19.529 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_13/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_13/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_13/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_13/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_13/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_13/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_13/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_13/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_13/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_13/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_13/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_13/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[True-GET-/api/kernelspecs/{kernelspec}-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd6d80e0> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '1b3ccc07' environ = None http_port = 34181 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd6d8220> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34181 jp_logging_stream = <_io.StringIO object at 0x7f21bd56a2c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_14/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_14/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_14') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd4d5570> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:19.622 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_14/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_14/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_14/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_14/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_14/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_14/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_14/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_14/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_14/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_14/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_14/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_14/config/jupyter_server_config.json ___ ERROR at setup of test_authorized_requests[True-GET-/api/nbconvert-None] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd6f8fe0> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'd6974feb' environ = None http_port = 41763 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd6d8720> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41763 jp_logging_stream = <_io.StringIO object at 0x7f21bd56b4c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_15/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_15/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_15') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd7c0f50> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:19.727 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_15/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_15/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_15/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_15/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_15/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_15/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_15/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_15/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_15/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_15/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_15/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_15/config/jupyter_server_config.json ___ ERROR at setup of test_authorized_requests[True-GET-/api/spec.yaml-None] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd6d8f40> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '2c575fbb' environ = None http_port = 34601 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd6d8c20> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34601 jp_logging_stream = <_io.StringIO object at 0x7f21bd7c0340> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_16/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_16/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_16') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd7c1c10> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:19.821 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_16/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_16/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_16/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_16/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_16/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_16/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_16/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_16/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_16/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_16/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_16/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_16/config/jupyter_server_config.json ____ ERROR at setup of test_authorized_requests[True-GET-/api/status-None] _____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd6daf20> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '7f27adc8' environ = None http_port = 33621 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd6d9bc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33621 jp_logging_stream = <_io.StringIO object at 0x7f21bd7c1240> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_17/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_17/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_17') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bda7a990> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:19.919 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_17/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_17/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_17/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_17/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_17/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_17/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_17/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_17/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_17/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_17/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_17/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_17/config/jupyter_server_config.json __ ERROR at setup of test_authorized_requests[True-GET-/api/config/foo-None] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd6db9c0> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'eb9e4091' environ = None http_port = 40379 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd6d9e40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40379 jp_logging_stream = <_io.StringIO object at 0x7f21bd7c0880> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_18/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_18/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_18') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bda7b800> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:20.013 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_18/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_18/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_18/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_18/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_18/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_18/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_18/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_18/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_18/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_18/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_18/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_18/config/jupyter_server_config.json ___ ERROR at setup of test_authorized_requests[True-PUT-/api/config/foo-{}] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd6d9120> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '4c2ac129' environ = None http_port = 39843 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd6da980> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39843 jp_logging_stream = <_io.StringIO object at 0x7f21bd7c1300> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_19/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_19/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_19') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd6dba70> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:20.108 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_19/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_19/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_19/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_19/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_19/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_19/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_19/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_19/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_19/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_19/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_19/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_19/config/jupyter_server_config.json __ ERROR at setup of test_authorized_requests[True-PATCH-/api/config/foo-{}] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd6d9940> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '0c847fce' environ = None http_port = 36121 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc858720> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36121 jp_logging_stream = <_io.StringIO object at 0x7f21bd7c1840> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_20/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_20/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_20') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc858c30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:20.212 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_20/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_20/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_20/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_20/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_20/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_20/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_20/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_20/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_20/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_20/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_20/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_20/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[True-POST-api/security/csp-report-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc859d00> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '27e4dc1b' environ = None http_port = 33471 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc859260> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33471 jp_logging_stream = <_io.StringIO object at 0x7f21bd7c2680> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_21/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_21/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_21') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd731d90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:20.307 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_21/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_21/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_21/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_21/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_21/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_21/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_21/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_21/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_21/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_21/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_21/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_21/config/jupyter_server_config.json ___ ERROR at setup of test_authorized_requests[True-GET-/api/sessions-None] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc85ad40> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'c5d3fe25' environ = None http_port = 38463 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc859940> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38463 jp_logging_stream = <_io.StringIO object at 0x7f21bd7c2c80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_22/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_22/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_22') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc7ec4d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:20.411 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_22/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_22/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_22/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_22/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_22/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_22/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_22/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_22/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_22/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_22/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_22/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_22/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[True-GET-/api/sessions/{session_id}-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc85b740> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '0341dda9' environ = None http_port = 41833 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc8599e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41833 jp_logging_stream = <_io.StringIO object at 0x7f21bd7c3280> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_23/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_23/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_23') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bca1ed50> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:20.507 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_23/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_23/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_23/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_23/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_23/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_23/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_23/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_23/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_23/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_23/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_23/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_23/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[True-PATCH-/api/sessions/{session_id}-{}] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc85ac00> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'f62c5bfa' environ = None http_port = 37343 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc85a0c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37343 jp_logging_stream = <_io.StringIO object at 0x7f21bd7c0940> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_24/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_24/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_24') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc841240> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:20.605 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_24/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_24/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_24/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_24/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_24/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_24/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_24/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_24/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_24/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_24/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_24/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_24/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[True-DELETE-/api/sessions/{session_id}-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc85b880> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '5adc47e0' environ = None http_port = 45921 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc820180> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45921 jp_logging_stream = <_io.StringIO object at 0x7f21bd7c1780> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_25/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_25/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_25') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc842900> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:20.701 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_25/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_25/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_25/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_25/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_25/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_25/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_25/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_25/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_25/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_25/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_25/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_25/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[True-POST-/api/sessions-{"path": "foo", "type": "bar"}] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc821940> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '2dde5b53' environ = None http_port = 40167 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc820720> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40167 jp_logging_stream = <_io.StringIO object at 0x7f21bc854580> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_26/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_26/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_26') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc7eb0b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:20.797 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_26/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_26/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_26/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_26/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_26/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_26/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_26/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_26/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_26/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_26/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_26/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_26/config/jupyter_server_config.json ____ ERROR at setup of test_authorized_requests[True-POST-/api/terminals-] _____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc822480> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'd4e35100' environ = None http_port = 44863 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc8225c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44863 jp_logging_stream = <_io.StringIO object at 0x7f21bc854d00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_27/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_27/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_27') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc8058b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:20.902 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_27/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_27/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_27/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_27/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_27/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_27/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_27/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_27/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_27/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_27/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_27/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_27/config/jupyter_server_config.json ___ ERROR at setup of test_authorized_requests[True-GET-/api/terminals-None] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc822fc0> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'beb5fb20' environ = None http_port = 41235 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc821bc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41235 jp_logging_stream = <_io.StringIO object at 0x7f21bc8544c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_28/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_28/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_28') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc88f4d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:20.998 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_28/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_28/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_28/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_28/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_28/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_28/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_28/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_28/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_28/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_28/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_28/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_28/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[True-GET-/terminals/websocket/{term_name}-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc821f80> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '24625651' environ = None http_port = 33985 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc821d00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33985 jp_logging_stream = <_io.StringIO object at 0x7f21bc855480> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_29/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_29/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_29') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc869f40> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:21.160 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_29/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_29/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_29/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_29/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_29/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_29/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_29/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_29/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_29/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_29/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_29/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_29/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[True-DELETE-/api/terminals/{term_name}-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc859a80> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'ec6b8863' environ = None http_port = 41915 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc8232e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41915 jp_logging_stream = <_io.StringIO object at 0x7f21bc855a80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_30/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_30/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_30') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc88c780> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:21.256 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_30/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_30/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_30/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_30/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_30/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_30/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_30/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_30/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_30/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_30/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_30/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_True_30/config/jupyter_server_config.json __ ERROR at setup of test_authorized_requests[False-GET-/view/{nbpath}-None] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc440180> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '7dac5327' environ = None http_port = 42249 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc440360> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42249 jp_logging_stream = <_io.StringIO object at 0x7f21bc856080> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc70f930> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:21.354 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False0/config/jupyter_server_config.json ___ ERROR at setup of test_authorized_requests[False-GET-/api/contents-None] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc441b20> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '2ef2d935' environ = None http_port = 46419 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc440cc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46419 jp_logging_stream = <_io.StringIO object at 0x7f21bc856680> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc70d720> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:21.450 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False1/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[False-POST-/api/contents-{"type": "directory"}] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc440fe0> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'eb476691' environ = None http_port = 33783 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc440e00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33783 jp_logging_stream = <_io.StringIO object at 0x7f21bc856c80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc88cf50> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:21.544 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False2/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[False-PUT-/api/contents/foo-{"type": "directory"}] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc442fc0> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'c8427ac9' environ = None http_port = 36457 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc441300> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36457 jp_logging_stream = <_io.StringIO object at 0x7f21bc857280> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd55b1b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:21.648 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False3/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[False-PATCH-/api/contents/{nbpath}-{"path": "/newpath"}] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc822e80> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'b8a4acab' environ = None http_port = 36045 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc442700> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36045 jp_logging_stream = <_io.StringIO object at 0x7f21bc857880> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc70d180> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:21.742 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False4/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[False-DELETE-/api/contents/{nbpath}-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc4427a0> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'ab2fb534' environ = None http_port = 37555 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc4411c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37555 jp_logging_stream = <_io.StringIO object at 0x7f21bc404b80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd558a00> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:21.842 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False5/config/jupyter_server_config.json ___ ERROR at setup of test_authorized_requests[False-GET-/api/kernels-None] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc443ba0> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '3723a6df' environ = None http_port = 37895 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc490180> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37895 jp_logging_stream = <_io.StringIO object at 0x7f21bc404400> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False6/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False6/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False6') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc4cf2a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:21.937 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False6/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[False-GET-/api/kernels/{kernel_id}-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc4918a0> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'b6cfb7a9' environ = None http_port = 44747 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc490720> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44747 jp_logging_stream = <_io.StringIO object at 0x7f21bc405240> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False7/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False7/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd559b30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:22.032 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False7/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[False-GET-/api/kernels/{kernel_id}/channels-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc490ea0> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'eb72aa02' environ = None http_port = 38241 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc490cc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38241 jp_logging_stream = <_io.StringIO object at 0x7f21bc4050c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False8/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False8/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False8') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc4ce620> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:22.136 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False8/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False8/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False8/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False8/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False8/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False8/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[False-POST-/api/kernels/{kernel_id}/interrupt-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc443600> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'f10ea489' environ = None http_port = 39227 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc491b20> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39227 jp_logging_stream = <_io.StringIO object at 0x7f21bc4056c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False9/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False9/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False9') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc47f430> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:22.231 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False9/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False9/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False9/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False9/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False9/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False9/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[False-POST-/api/kernels/{kernel_id}/restart-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc493920> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '5202bc99' environ = None http_port = 40493 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc492520> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40493 jp_logging_stream = <_io.StringIO object at 0x7f21bc405cc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False10/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False10/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False10') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc47e580> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:22.334 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False10/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False10/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False10/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False10/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False10/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False10/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[False-DELETE-/api/kernels/{kernel_id}-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc492660> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '13622c51' environ = None http_port = 33895 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc492700> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33895 jp_logging_stream = <_io.StringIO object at 0x7f21bc4062c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False11/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False11/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False11') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc47d950> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:22.429 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False11/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False11/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False11/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False11/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False11/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False11/config/jupyter_server_config.json ___ ERROR at setup of test_authorized_requests[False-POST-/api/kernels-None] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc491bc0> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'abf85bc2' environ = None http_port = 44359 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bca00040> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44359 jp_logging_stream = <_io.StringIO object at 0x7f21bc4068c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False12/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False12/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False12') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc48f930> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:22.524 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False12/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False12/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False12/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False12/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False12/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False12/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False12/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False12/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False12/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False12/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False12/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False12/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[False-GET-/api/kernelspecs-None] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bca018a0> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '8dd83b37' environ = None http_port = 43761 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bca00a40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43761 jp_logging_stream = <_io.StringIO object at 0x7f21bc406ec0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False13/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False13/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False13') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc47ddb0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:22.618 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False13/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False13/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False13/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False13/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False13/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False13/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False13/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False13/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False13/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False13/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False13/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False13/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[False-GET-/api/kernelspecs/{kernelspec}-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc492a20> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '27894e1d' environ = None http_port = 40727 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bca00ae0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40727 jp_logging_stream = <_io.StringIO object at 0x7f21bc4074c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False14/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False14/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False14') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bca9b980> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:22.714 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False14/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False14/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False14/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False14/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False14/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False14/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False14/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False14/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False14/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False14/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False14/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False14/config/jupyter_server_config.json __ ERROR at setup of test_authorized_requests[False-GET-/api/nbconvert-None] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bca02980> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'a12498e4' environ = None http_port = 34613 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bca01940> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34613 jp_logging_stream = <_io.StringIO object at 0x7f21bc407b80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False15/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False15/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False15') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bca994a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:22.819 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False15/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False15/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False15/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False15/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False15/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False15/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False15/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False15/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False15/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False15/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False15/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False15/config/jupyter_server_config.json __ ERROR at setup of test_authorized_requests[False-GET-/api/spec.yaml-None] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bca03920> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '9dbbc5f0' environ = None http_port = 36065 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bca02520> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36065 jp_logging_stream = <_io.StringIO object at 0x7f21bcaa4040> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False16/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False16/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False16') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bca9b480> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:22.915 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False16/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False16/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False16/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False16/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False16/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False16/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False16/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False16/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False16/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False16/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False16/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False16/config/jupyter_server_config.json ____ ERROR at setup of test_authorized_requests[False-GET-/api/status-None] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bca027a0> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'fab01376' environ = None http_port = 39305 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bca01bc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39305 jp_logging_stream = <_io.StringIO object at 0x7f21bcaa4e80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False17/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False17/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False17') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc48db30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:23.086 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False17/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False17/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False17/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False17/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False17/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False17/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False17/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False17/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False17/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False17/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False17/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False17/config/jupyter_server_config.json __ ERROR at setup of test_authorized_requests[False-GET-/api/config/foo-None] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bca01b20> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '13f21575' environ = None http_port = 34721 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bca840e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34721 jp_logging_stream = <_io.StringIO object at 0x7f21bcaa4880> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False18/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False18/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False18') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bcab8fa0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:23.182 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False18/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False18/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False18/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False18/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False18/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False18/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False18/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False18/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False18/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False18/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False18/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False18/config/jupyter_server_config.json ___ ERROR at setup of test_authorized_requests[False-PUT-/api/config/foo-{}] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bca02340> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '6dcb7c9a' environ = None http_port = 34019 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bca84ae0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34019 jp_logging_stream = <_io.StringIO object at 0x7f21bcaa5300> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False19/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False19/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False19') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bcaba990> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:23.281 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False19/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False19/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False19/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False19/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False19/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False19/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False19/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False19/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False19/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False19/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False19/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False19/config/jupyter_server_config.json __ ERROR at setup of test_authorized_requests[False-PATCH-/api/config/foo-{}] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bca85ee0> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'a8a2f54c' environ = None http_port = 37519 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bca84ea0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37519 jp_logging_stream = <_io.StringIO object at 0x7f21bcaa5900> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False20/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False20/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False20') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc906ad0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:23.379 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False20/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False20/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False20/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False20/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False20/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False20/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False20/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False20/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False20/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False20/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False20/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False20/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[False-POST-api/security/csp-report-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bca86de0> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'd40b0c51' environ = None http_port = 44309 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bca85080> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44309 jp_logging_stream = <_io.StringIO object at 0x7f21bcaa5f00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False21/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False21/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False21') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc907520> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:23.478 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False21/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False21/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False21/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False21/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False21/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False21/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False21/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False21/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False21/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False21/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False21/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False21/config/jupyter_server_config.json ___ ERROR at setup of test_authorized_requests[False-GET-/api/sessions-None] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bca879c0> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '0a4c7708' environ = None http_port = 46237 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bca865c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46237 jp_logging_stream = <_io.StringIO object at 0x7f21bcaa6500> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False22/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False22/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False22') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bcaba800> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:23.589 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False22/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False22/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False22/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False22/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False22/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False22/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False22/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False22/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False22/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False22/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False22/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False22/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[False-GET-/api/sessions/{session_id}-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bca867a0> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'dff5b482' environ = None http_port = 35319 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bca85b20> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35319 jp_logging_stream = <_io.StringIO object at 0x7f21bcaa6b00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False23/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False23/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False23') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc5932f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:23.687 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False23/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False23/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False23/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False23/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False23/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False23/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False23/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False23/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False23/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False23/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False23/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False23/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[False-PATCH-/api/sessions/{session_id}-{}] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bca85440> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'c23d2ca2' environ = None http_port = 41857 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc5582c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41857 jp_logging_stream = <_io.StringIO object at 0x7f21bcaa7100> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False24/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False24/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False24') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc9048c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:23.789 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False24/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False24/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False24/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False24/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False24/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False24/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False24/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False24/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False24/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False24/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False24/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False24/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[False-DELETE-/api/sessions/{session_id}-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc559b20> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '0de433a8' environ = None http_port = 35721 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc558cc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35721 jp_logging_stream = <_io.StringIO object at 0x7f21bcaa7700> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False25/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False25/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False25') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc591f40> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:23.887 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False25/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False25/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False25/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False25/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False25/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False25/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False25/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False25/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False25/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False25/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False25/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False25/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[False-POST-/api/sessions-{"path": "foo", "type": "bar"}] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc559120> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '6b5eb5ca' environ = None http_port = 36555 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc558ea0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36555 jp_logging_stream = <_io.StringIO object at 0x7f21bcaa71c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False26/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False26/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False26') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc50b5c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:23.985 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False26/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False26/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False26/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False26/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False26/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False26/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False26/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False26/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False26/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False26/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False26/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False26/config/jupyter_server_config.json ____ ERROR at setup of test_authorized_requests[False-POST-/api/terminals-] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc55b100> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'e2541221' environ = None http_port = 36861 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc55b240> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36861 jp_logging_stream = <_io.StringIO object at 0x7f21bc50c340> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False27/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False27/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False27') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc592210> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:24.093 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False27/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False27/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False27/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False27/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False27/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False27/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False27/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False27/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False27/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False27/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False27/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False27/config/jupyter_server_config.json __ ERROR at setup of test_authorized_requests[False-GET-/api/terminals-None] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc55bc40> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '3255f062' environ = None http_port = 41537 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc55a840> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41537 jp_logging_stream = <_io.StringIO object at 0x7f21bc50d0c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False28/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False28/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False28') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc50ad50> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:24.192 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False28/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False28/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False28/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False28/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False28/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False28/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False28/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False28/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False28/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False28/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False28/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False28/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[False-GET-/terminals/websocket/{term_name}-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc55b380> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = 'dc03b5f7' environ = None http_port = 45547 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc55b560> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45547 jp_logging_stream = <_io.StringIO object at 0x7f21bc50cac0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False29/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False29/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False29') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc5bf3e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:24.299 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False29/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False29/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False29/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False29/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False29/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False29/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False29/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False29/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False29/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False29/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False29/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False29/config/jupyter_server_config.json _ ERROR at setup of test_authorized_requests[False-DELETE-/api/terminals/{term_name}-None] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc908360> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '8a0d6eb6' environ = None http_port = 40213 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc908540> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40213 jp_logging_stream = <_io.StringIO object at 0x7f21bc50d540> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False30/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False30/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False30') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc50b2f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:24.399 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False30/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False30/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False30/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False30/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False30/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False30/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False30/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False30/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False30/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False30/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False30/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authorized_requests_False30/config/jupyter_server_config.json __________ ERROR at setup of test_async_authorizer[jp_server_config0] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc909da0> jp_server_config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} config = {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}} default_token = '55bf9b81' environ = None http_port = 37989 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc908f40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37989 jp_logging_stream = <_io.StringIO object at 0x7f21bc50c640> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_async_authorizer_jp_serve0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_async_authorizer_jp_serve0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_async_authorizer_jp_serve0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc5bd950> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:24.500 ServerApp] Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_async_authorizer_jp_serve0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_async_authorizer_jp_serve0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_async_authorizer_jp_serve0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_authorizer_jp_serve0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_authorizer_jp_serve0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_authorizer_jp_serve0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_authorizer_jp_serve0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_authorizer_jp_serve0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_authorizer_jp_serve0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'authorizer_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_async_authorizer_jp_serve0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_async_authorizer_jp_serve0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_async_authorizer_jp_serve0/config/jupyter_server_config.json _____________________ ERROR at setup of test_auth_disabled _____________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc9a4c20> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'c2843c2b' environ = None http_port = 41475 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc9a4d60> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41475 jp_logging_stream = <_io.StringIO object at 0x7f21bc50ee00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_auth_disabled0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_auth_disabled0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_auth_disabled0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc913070> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:24.634 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_auth_disabled0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_auth_disabled0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_auth_disabled0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_auth_disabled0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_auth_disabled0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_auth_disabled0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_auth_disabled0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_auth_disabled0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_auth_disabled0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_auth_disabled0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_auth_disabled0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_auth_disabled0/config/jupyter_server_config.json _________________ ERROR at setup of test_change_password[True] _________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc9a67a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'login_handler_class': }} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'login_handler_class': }} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'login_handler_class': }} default_token = 'cca85b28' environ = None http_port = 33137 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc9a6a20> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33137 jp_logging_stream = <_io.StringIO object at 0x7f21bc50fe80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc8e7980> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:24.751 ServerApp] Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_0/config/jupyter_server_config.json ________________ ERROR at setup of test_change_password[False] _________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc9a71a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'login_handler_class': }} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'login_handler_class': }} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'login_handler_class': }} default_token = '98bfd50e' environ = None http_port = 45667 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc9a72e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45667 jp_logging_stream = <_io.StringIO object at 0x7f21bc6cc040> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc8e63a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:24.852 ServerApp] Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_0/config/jupyter_server_config.json _____________________ ERROR at setup of test_login_cookie ______________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc9a76a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'login_handler_class': }} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'login_handler_class': }} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'login_handler_class': }} default_token = 'f1859a58' environ = None http_port = 40485 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc9a4040> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40485 jp_logging_stream = <_io.StringIO object at 0x7f21bc6cce80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_login_cookie0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_login_cookie0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_login_cookie0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc9a3ed0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:24.949 ServerApp] Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_login_cookie0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_login_cookie0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_login_cookie0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_login_cookie0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_login_cookie0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_login_cookie0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_login_cookie0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_login_cookie0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_login_cookie0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_login_cookie0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_login_cookie0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_login_cookie0/config/jupyter_server_config.json ________________________ ERROR at setup of test_logout _________________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc9a7880> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'login_handler_class': }} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'login_handler_class': }} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'login_handler_class': }} default_token = '2bff7acc' environ = None http_port = 39861 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc9a4ea0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39861 jp_logging_stream = <_io.StringIO object at 0x7f21bc50f4c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_logout0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_logout0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_logout0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc9a0370> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:25.120 ServerApp] Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_logout0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_logout0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_logout0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_logout0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_logout0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_logout0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_logout0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_logout0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_logout0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_logout0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_logout0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_logout0/config/jupyter_server_config.json ________________ ERROR at setup of test_legacy_identity_config _________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc9a4cc0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'login_handler_class': }} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'login_handler_class': }} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'login_handler_class': }} default_token = '62808029' environ = None http_port = 42345 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc9a7ce0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42345 jp_logging_stream = <_io.StringIO object at 0x7f21bc50e680> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_config0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_config0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_config0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc48ca00> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:25.218 ServerApp] Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_config0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_config0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_config0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_config0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_config0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_config0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_config0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_config0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_config0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_config0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_config0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_config0/config/jupyter_server_config.json __________________ ERROR at setup of test_legacy_identity_api __________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc2cd6c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'login_handler_class': }} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'login_handler_class': }} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'login_handler_class': }} default_token = '638294ae' environ = None http_port = 39391 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc2cc860> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39391 jp_logging_stream = <_io.StringIO object at 0x7f21bc6cdb40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_api0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_api0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_api0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc8e5040> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:25.316 ServerApp] Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_api0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_api0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_api0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_api0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_api0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_api0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_api0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_api0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_api0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_api0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_api0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_legacy_identity_api0/config/jupyter_server_config.json ___________________ ERROR at setup of test_legacy_base_class ___________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc2cdf80> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'login_handler_class': }} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'login_handler_class': }} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'login_handler_class': }} default_token = '862e94f0' environ = None http_port = 43021 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc2ccb80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43021 jp_logging_stream = <_io.StringIO object at 0x7f21bc6ce200> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_legacy_base_class0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_legacy_base_class0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_legacy_base_class0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc29d4f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:25.425 ServerApp] Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_legacy_base_class0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_legacy_base_class0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_legacy_base_class0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_legacy_base_class0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_legacy_base_class0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_legacy_base_class0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_legacy_base_class0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_legacy_base_class0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_legacy_base_class0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'login_handler_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_legacy_base_class0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_legacy_base_class0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_legacy_base_class0/config/jupyter_server_config.json __________________ ERROR at setup of test_next_bad[\\\\tree] ___________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc296200> jp_server_config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '787cb0e0' environ = None http_port = 42491 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc296340> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42491 jp_logging_stream = <_io.StringIO object at 0x7f21bc6ceb00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_next_bad_____tree_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_next_bad_____tree_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_next_bad_____tree_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc2b33e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:25.798 ServerApp] Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_next_bad_____tree_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_next_bad_____tree_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_next_bad_____tree_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_____tree_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_____tree_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_____tree_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_____tree_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_____tree_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_____tree_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_____tree_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_____tree_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_____tree_0/config/jupyter_server_config.json _________________ ERROR at setup of test_next_bad[//some-host] _________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc2965c0> jp_server_config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'e004dc79' environ = None http_port = 35681 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc295120> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35681 jp_logging_stream = <_io.StringIO object at 0x7f21bc6cef80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_next_bad___some_host_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_next_bad___some_host_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_next_bad___some_host_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc2b1d60> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:25.894 ServerApp] Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_next_bad___some_host_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_next_bad___some_host_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_next_bad___some_host_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad___some_host_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad___some_host_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad___some_host_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad___some_host_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad___some_host_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad___some_host_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_bad___some_host_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_bad___some_host_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_bad___some_host_0/config/jupyter_server_config.json ____________ ERROR at setup of test_next_bad[//host{base_url}tree] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc297420> jp_server_config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '883b191e' environ = None http_port = 41509 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc295a80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41509 jp_logging_stream = <_io.StringIO object at 0x7f21bc6ceec0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_next_bad___host_base_url_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_next_bad___host_base_url_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_next_bad___host_base_url_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc24fed0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:25.989 ServerApp] Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_next_bad___host_base_url_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_next_bad___host_base_url_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_next_bad___host_base_url_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad___host_base_url_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad___host_base_url_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad___host_base_url_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad___host_base_url_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad___host_base_url_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad___host_base_url_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_bad___host_base_url_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_bad___host_base_url_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_bad___host_base_url_0/config/jupyter_server_config.json _____________ ERROR at setup of test_next_bad[https://google.com] ______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc297e20> jp_server_config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '3950bdf9' environ = None http_port = 33743 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc296980> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33743 jp_logging_stream = <_io.StringIO object at 0x7f21bc298ac0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https___google_c0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https___google_c0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https___google_c0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc2b1fe0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:26.085 ServerApp] Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https___google_c0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https___google_c0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https___google_c0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https___google_c0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https___google_c0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https___google_c0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https___google_c0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https___google_c0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https___google_c0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https___google_c0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https___google_c0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https___google_c0/config/jupyter_server_config.json ___________ ERROR at setup of test_next_bad[/absolute/not/base_url] ____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc295bc0> jp_server_config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '2b01b72e' environ = None http_port = 36755 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc2974c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36755 jp_logging_stream = <_io.StringIO object at 0x7f21bc2990c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_next_bad__absolute_not_ba0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_next_bad__absolute_not_ba0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_next_bad__absolute_not_ba0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc24cb40> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:26.191 ServerApp] Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_next_bad__absolute_not_ba0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_next_bad__absolute_not_ba0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_next_bad__absolute_not_ba0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad__absolute_not_ba0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad__absolute_not_ba0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad__absolute_not_ba0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad__absolute_not_ba0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad__absolute_not_ba0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad__absolute_not_ba0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_bad__absolute_not_ba0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_bad__absolute_not_ba0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_bad__absolute_not_ba0/config/jupyter_server_config.json _________ ERROR at setup of test_next_bad[https:///a%40b/extra/slash] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc1782c0> jp_server_config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '16256b9e' environ = None http_port = 44119 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc1784a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44119 jp_logging_stream = <_io.StringIO object at 0x7f21bc2996c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https____a_40b_e0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https____a_40b_e0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https____a_40b_e0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc141d10> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:26.286 ServerApp] Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https____a_40b_e0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https____a_40b_e0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https____a_40b_e0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https____a_40b_e0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https____a_40b_e0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https____a_40b_e0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https____a_40b_e0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https____a_40b_e0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https____a_40b_e0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https____a_40b_e0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https____a_40b_e0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_bad_https____a_40b_e0/config/jupyter_server_config.json ____________________ ERROR at setup of test_next_ok[tree/] _____________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc179760> jp_server_config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '7322777b' environ = None http_port = 34463 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc178e00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34463 jp_logging_stream = <_io.StringIO object at 0x7f21bc299540> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc1432f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:26.386 ServerApp] Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__0/config/jupyter_server_config.json _______________ ERROR at setup of test_next_ok[//{base_url}tree] _______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc17a520> jp_server_config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '8b78c18b' environ = None http_port = 46305 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc179120> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46305 jp_logging_stream = <_io.StringIO object at 0x7f21bc298100> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_next_ok____base_url_tree_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_next_ok____base_url_tree_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_next_ok____base_url_tree_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc1c3250> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:26.481 ServerApp] Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_next_ok____base_url_tree_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_next_ok____base_url_tree_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_next_ok____base_url_tree_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok____base_url_tree_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok____base_url_tree_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok____base_url_tree_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok____base_url_tree_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok____base_url_tree_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok____base_url_tree_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_ok____base_url_tree_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_ok____base_url_tree_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_ok____base_url_tree_0/config/jupyter_server_config.json ___________ ERROR at setup of test_next_ok[notebooks/notebook.ipynb] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc17af20> jp_server_config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'eeccf6ba' environ = None http_port = 34895 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc179580> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34895 jp_logging_stream = <_io.StringIO object at 0x7f21bc298d00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_next_ok_notebooks_noteboo0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_next_ok_notebooks_noteboo0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_next_ok_notebooks_noteboo0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc1c0500> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:26.575 ServerApp] Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_next_ok_notebooks_noteboo0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_next_ok_notebooks_noteboo0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_next_ok_notebooks_noteboo0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_notebooks_noteboo0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_notebooks_noteboo0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_notebooks_noteboo0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_notebooks_noteboo0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_notebooks_noteboo0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_notebooks_noteboo0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_notebooks_noteboo0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_notebooks_noteboo0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_notebooks_noteboo0/config/jupyter_server_config.json _______________ ERROR at setup of test_next_ok[tree//something] ________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc17b920> jp_server_config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'c8334a31' environ = None http_port = 38355 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc179ee0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38355 jp_logging_stream = <_io.StringIO object at 0x7f21bc299300> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__something_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__something_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__something_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc140e10> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:26.680 ServerApp] Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__something_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__something_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__something_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__something_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__something_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__something_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__something_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__something_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__something_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__something_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__something_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_next_ok_tree__something_0/config/jupyter_server_config.json _____________________ ERROR at setup of test_login_cookie ______________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc17ade0> jp_server_config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '819772aa' environ = None http_port = 43335 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc179300> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43335 jp_logging_stream = <_io.StringIO object at 0x7f21bc299900> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_login_cookie1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_login_cookie1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_login_cookie1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc157160> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:26.774 ServerApp] Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_login_cookie1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_login_cookie1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_login_cookie1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_login_cookie1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_login_cookie1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_login_cookie1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_login_cookie1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_login_cookie1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_login_cookie1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_login_cookie1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_login_cookie1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_login_cookie1/config/jupyter_server_config.json _________________ ERROR at setup of test_change_password[True] _________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc17a660> jp_server_config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'b43f93e4' environ = None http_port = 35521 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc17ba60> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35521 jp_logging_stream = <_io.StringIO object at 0x7f21bc299f00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc1c2f30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:26.878 ServerApp] Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_change_password_True_1/config/jupyter_server_config.json ________________ ERROR at setup of test_change_password[False] _________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc3d0540> jp_server_config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'c7b4b1bc' environ = None http_port = 39923 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc3d0720> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39923 jp_logging_stream = <_io.StringIO object at 0x7f21bc29b280> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc154e10> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:26.973 ServerApp] Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_change_password_False_1/config/jupyter_server_config.json ________________________ ERROR at setup of test_logout _________________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc3d1940> jp_server_config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '75a423ad' environ = None http_port = 37859 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc3d1bc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37859 jp_logging_stream = <_io.StringIO object at 0x7f21bc29ae00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_logout1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_logout1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_logout1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd72cfa0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:27.160 ServerApp] Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_logout1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_logout1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_logout1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_logout1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_logout1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_logout1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_logout1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_logout1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_logout1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_logout1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_logout1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_logout1/config/jupyter_server_config.json _________________ ERROR at setup of test_token_cookie_user_id __________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc3d1f80> jp_server_config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'eef83e45' environ = None http_port = 38807 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc3d07c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38807 jp_logging_stream = <_io.StringIO object at 0x7f21bc3a9000> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_token_cookie_user_id0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_token_cookie_user_id0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_token_cookie_user_id0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc155ae0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:27.254 ServerApp] Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_token_cookie_user_id0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_token_cookie_user_id0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_token_cookie_user_id0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_cookie_user_id0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_cookie_user_id0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_cookie_user_id0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_cookie_user_id0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_cookie_user_id0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_cookie_user_id0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'base_url': '/a%40b/', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_token_cookie_user_id0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_token_cookie_user_id0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_token_cookie_user_id0/config/jupyter_server_config.json ______________ ERROR at setup of test_jupyter_handler_contextvar _______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc3d3f60> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'f4d13bd3' environ = None http_port = 33531 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc390180> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33531 jp_logging_stream = <_io.StringIO object at 0x7f21bc3a96c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_contextva0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_contextva0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_contextva0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7ee6cb0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:27.604 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_contextva0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_contextva0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_contextva0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_contextva0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_contextva0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_contextva0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_contextva0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_contextva0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_contextva0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_contextva0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_contextva0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_contextva0/config/jupyter_server_config.json _________________ ERROR at setup of test_authenticated_handler _________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc3905e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '39bec232' environ = None http_port = 34161 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc390cc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34161 jp_logging_stream = <_io.StringIO object at 0x7f21bc3a9cc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authenticated_handler0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authenticated_handler0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authenticated_handler0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc363cf0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:28.714 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authenticated_handler0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authenticated_handler0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authenticated_handler0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authenticated_handler0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authenticated_handler0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authenticated_handler0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authenticated_handler0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authenticated_handler0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authenticated_handler0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authenticated_handler0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authenticated_handler0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authenticated_handler0/config/jupyter_server_config.json ____________________ ERROR at setup of test_jupyter_handler ____________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc392700> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'b580150e' environ = None http_port = 40073 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc3928e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40073 jp_logging_stream = <_io.StringIO object at 0x7f21bc3aa2c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc33ffc0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:28.807 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler0/config/jupyter_server_config.json __ ERROR at setup of test_jupyter_handler_auth_permissive[jp_server_config0] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc393100> jp_server_config = {'ServerApp': {'allow_unauthenticated_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'allow_unauthenticated_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'allow_unauthenticated_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'fbd35bdb' environ = None http_port = 43513 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc391d00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43513 jp_logging_stream = <_io.StringIO object at 0x7f21bc3a81c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_perm0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_perm0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_perm0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7ee5c70> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:28.907 ServerApp] Config changed: {'ServerApp': {'allow_unauthenticated_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_perm0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_perm0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_perm0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_perm0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_perm0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_perm0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_perm0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_perm0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_perm0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_perm0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_perm0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_perm0/config/jupyter_server_config.json ___ ERROR at setup of test_jupyter_handler_auth_required[jp_server_config0] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc393b00> jp_server_config = {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'a0a7fff8' environ = None http_port = 41023 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc392160> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41023 jp_logging_stream = <_io.StringIO object at 0x7f21bc3a9240> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_requ0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_requ0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_requ0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc33c230> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:29.000 ServerApp] Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_requ0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_requ0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_requ0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_requ0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_requ0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_requ0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_requ0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_requ0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_requ0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_requ0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_requ0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_requ0/config/jupyter_server_config.json _ ERROR at setup of test_jupyter_handler_auth_calls_prepare[jp_server_config0] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc391ee0> jp_server_config = {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'f57e58a6' environ = None http_port = 34949 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc390e00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34949 jp_logging_stream = <_io.StringIO object at 0x7f21bc3aa680> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_call0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_call0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_call0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd2ef2a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:29.092 ServerApp] Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_call0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_call0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_call0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_call0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_call0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_call0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_call0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_call0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_call0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_call0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_call0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_call0/config/jupyter_server_config.json _ ERROR at setup of test_jupyter_handler_auth_respsects_identity_provider[jp_server_config0] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc3934c0> jp_server_config = {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '83d8c450' environ = None http_port = 39397 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd38c220> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39397 jp_logging_stream = <_io.StringIO object at 0x7f21bc3aa080> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_resp0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_resp0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_resp0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc33cd20> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:29.183 ServerApp] Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_resp0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_resp0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_resp0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_resp0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_resp0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_resp0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_resp0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_resp0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_resp0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_resp0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_resp0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_jupyter_handler_auth_resp0/config/jupyter_server_config.json ______________________ ERROR at setup of test_api_handler ______________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd38d4e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'ec29d9c5' environ = None http_port = 43765 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd38cb80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43765 jp_logging_stream = <_io.StringIO object at 0x7f21bc3ab340> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_api_handler0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_api_handler0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_api_handler0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd2ec8c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:29.274 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_api_handler0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_api_handler0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_api_handler0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_api_handler0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_api_handler0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_api_handler0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_api_handler0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_api_handler0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_api_handler0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_api_handler0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_api_handler0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_api_handler0/config/jupyter_server_config.json ______________ ERROR at setup of test_authenticated_file_handler _______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd38e2a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '96aadf8d' environ = None http_port = 37593 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd38cea0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37593 jp_logging_stream = <_io.StringIO object at 0x7f21bd3610c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_authenticated_file_handle0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authenticated_file_handle0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_authenticated_file_handle0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd387ed0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:29.375 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_authenticated_file_handle0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authenticated_file_handle0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_authenticated_file_handle0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authenticated_file_handle0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authenticated_file_handle0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_authenticated_file_handle0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authenticated_file_handle0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authenticated_file_handle0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_authenticated_file_handle0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authenticated_file_handle0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authenticated_file_handle0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_authenticated_file_handle0/config/jupyter_server_config.json __________________ ERROR at setup of test_api_version_handler __________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd38eca0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '3f67a4f5' environ = None http_port = 44975 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd38d300> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44975 jp_logging_stream = <_io.StringIO object at 0x7f21bd3616c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_api_version_handler0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_api_version_handler0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_api_version_handler0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bd384ff0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:29.464 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_api_version_handler0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_api_version_handler0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_api_version_handler0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_api_version_handler0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_api_version_handler0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_api_version_handler0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_api_version_handler0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_api_version_handler0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_api_version_handler0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_api_version_handler0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_api_version_handler0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_api_version_handler0/config/jupyter_server_config.json ________________ ERROR at setup of test_files_redirect_handler _________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd38f560> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'a6958e9f' environ = None http_port = 37693 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd38dbc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37693 jp_logging_stream = <_io.StringIO object at 0x7f21bd361540> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_files_redirect_handler0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_files_redirect_handler0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_files_redirect_handler0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc72b4d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:29.558 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_files_redirect_handler0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_files_redirect_handler0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_files_redirect_handler0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_files_redirect_handler0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_files_redirect_handler0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_files_redirect_handler0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_files_redirect_handler0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_files_redirect_handler0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_files_redirect_handler0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_files_redirect_handler0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_files_redirect_handler0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_files_redirect_handler0/config/jupyter_server_config.json _________________ ERROR at setup of test_redirect_with_params __________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd38fec0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'd7eb836d' environ = None http_port = 43075 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd38e520> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43075 jp_logging_stream = <_io.StringIO object at 0x7f21bd360400> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_redirect_with_params0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_redirect_with_params0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_redirect_with_params0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc728730> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:29.648 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_redirect_with_params0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_redirect_with_params0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_redirect_with_params0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_redirect_with_params0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_redirect_with_params0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_redirect_with_params0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_redirect_with_params0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_redirect_with_params0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_redirect_with_params0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_redirect_with_params0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_redirect_with_params0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_redirect_with_params0/config/jupyter_server_config.json ____________________ ERROR at setup of test_static_handler _____________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bd38cfe0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '9008d023' environ = None http_port = 41393 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bd38ee80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41393 jp_logging_stream = <_io.StringIO object at 0x7f21bd360ac0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_static_handler0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_static_handler0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_static_handler0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc72b480> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:29.738 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_static_handler0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_static_handler0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_static_handler0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_static_handler0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_static_handler0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_static_handler0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_static_handler0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_static_handler0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_static_handler0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_static_handler0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_static_handler0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_static_handler0/config/jupyter_server_config.json ___________________ ERROR at setup of test_web_socket_mixin ____________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc784220> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'c036e1a5' environ = None http_port = 39409 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc784400> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39409 jp_logging_stream = <_io.StringIO object at 0x7f21bd361300> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc777160> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:29.836 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin0/config/jupyter_server_config.json _________________ ERROR at setup of test_web_socket_mixin_ping _________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc785580> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '85908e68' environ = None http_port = 36623 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc784c20> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36623 jp_logging_stream = <_io.StringIO object at 0x7f21bd361900> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin_ping0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin_ping0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin_ping0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc7298b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:29.924 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin_ping0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin_ping0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin_ping0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin_ping0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin_ping0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin_ping0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin_ping0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin_ping0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin_ping0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin_ping0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin_ping0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_web_socket_mixin_ping0/config/jupyter_server_config.json ________________ ERROR at setup of test_ping_client_terminated _________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc7863e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '3be80241' environ = None http_port = 34483 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc784fe0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34483 jp_logging_stream = <_io.StringIO object at 0x7f21bd361fc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_ping_client_terminated0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_ping_client_terminated0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_ping_client_terminated0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc776210> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:30.021 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_ping_client_terminated0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_ping_client_terminated0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_ping_client_terminated0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_ping_client_terminated0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_ping_client_terminated0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_ping_client_terminated0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_ping_client_terminated0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_ping_client_terminated0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_ping_client_terminated0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_ping_client_terminated0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_ping_client_terminated0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_ping_client_terminated0/config/jupyter_server_config.json __________________ ERROR at setup of test_ping_client_timeout __________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc786840> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '8a14d225' environ = None http_port = 40017 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc785260> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40017 jp_logging_stream = <_io.StringIO object at 0x7f21bd363400> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_ping_client_timeout0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_ping_client_timeout0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_ping_client_timeout0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc722f30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:30.112 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_ping_client_timeout0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_ping_client_timeout0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_ping_client_timeout0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_ping_client_timeout0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_ping_client_timeout0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_ping_client_timeout0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_ping_client_timeout0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_ping_client_timeout0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_ping_client_timeout0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_ping_client_timeout0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_ping_client_timeout0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_ping_client_timeout0/config/jupyter_server_config.json _____ ERROR at setup of test_websocket_auth_permissive[jp_server_config0] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc787600> jp_server_config = {'ServerApp': {'allow_unauthenticated_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'allow_unauthenticated_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'allow_unauthenticated_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '741b1f0d' environ = None http_port = 34119 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc785c60> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34119 jp_logging_stream = <_io.StringIO object at 0x7f21bc704b80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_permissive0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_permissive0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_permissive0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc774d70> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:30.279 ServerApp] Config changed: {'ServerApp': {'allow_unauthenticated_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_permissive0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_permissive0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_permissive0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_permissive0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_permissive0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_permissive0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_permissive0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_permissive0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_permissive0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_permissive0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_permissive0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_permissive0/config/jupyter_server_config.json ______ ERROR at setup of test_websocket_auth_required[jp_server_config0] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc787f60> jp_server_config = {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '70e73b8a' environ = None http_port = 36995 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc785da0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36995 jp_logging_stream = <_io.StringIO object at 0x7f21bc705180> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_required_j0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_required_j0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_required_j0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc7228f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:30.371 ServerApp] Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_required_j0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_required_j0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_required_j0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_required_j0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_required_j0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_required_j0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_required_j0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_required_j0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_required_j0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_required_j0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_required_j0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_required_j0/config/jupyter_server_config.json _ ERROR at setup of test_websocket_auth_respsects_identity_provider[jp_server_config0] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc7845e0> jp_server_config = {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'd16fd93f' environ = None http_port = 46211 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc7877e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46211 jp_logging_stream = <_io.StringIO object at 0x7f21bc705900> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_respsects_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_respsects_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_respsects_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc757200> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:30.461 ServerApp] Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_respsects_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_respsects_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_respsects_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_respsects_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_respsects_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_respsects_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_respsects_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_respsects_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_respsects_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_respsects_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_respsects_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_respsects_0/config/jupyter_server_config.json _ ERROR at setup of test_websocket_auth_warns_mixin_lacks_jupyter_handler[jp_server_config0] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc6685e0> jp_server_config = {'ServerApp': {'allow_unauthenticated_access': False, 'identity_provider': , 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'allow_unauthenticated_access': False, 'identity_provider': , 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'allow_unauthenticated_access': False, 'identity_provider': , 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '7ea250ab' environ = None http_port = 34523 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc6682c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34523 jp_logging_stream = <_io.StringIO object at 0x7f21bc705b40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_warns_mixi0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_warns_mixi0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_warns_mixi0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc723340> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [W 2024-12-18 10:41:30.561 ServerApp] Config option `identity_provider` not recognized by `ServerApp`. Did you mean `identity_provider_class`? [D 2024-12-18 10:41:30.561 ServerApp] Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'identity_provider': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ WARNING ServerApp:configurable.py:214 Config option `identity_provider` not recognized by `ServerApp`. Did you mean `identity_provider_class`? DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'identity_provider': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_warns_mixi0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_warns_mixi0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_warns_mixi0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_warns_mixi0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_warns_mixi0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_warns_mixi0/config WARNING ServerApp:configurable.py:214 Config option `identity_provider` not recognized by `ServerApp`. Did you mean `identity_provider_class`? DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'identity_provider': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_warns_mixi0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_warns_mixi0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_warns_mixi0/config WARNING ServerApp:configurable.py:214 Config option `identity_provider` not recognized by `ServerApp`. Did you mean `identity_provider_class`? DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'identity_provider': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} WARNING ServerApp:configurable.py:214 Config option `identity_provider` not recognized by `ServerApp`. Did you mean `identity_provider_class`? DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'identity_provider': , 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} WARNING ServerApp:configurable.py:214 Config option `identity_provider` not recognized by `ServerApp`. Did you mean `identity_provider_class`? DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_warns_mixi0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_warns_mixi0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_websocket_auth_warns_mixi0/config/jupyter_server_config.json ______________________ ERROR at setup of test_initialize _______________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc66a2a0> jp_server_config = {'MockExtensionApp': {'log_level': 'DEBUG', 'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_initialize0/templates']}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'MockExtensionApp': {'log_level': 'DEBUG', 'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_initialize0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} config = {'MockExtensionApp': {'log_level': 'DEBUG', 'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_initialize0/templates']}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} default_token = '2275674f' environ = None http_port = 45783 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc669080> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45783 jp_logging_stream = <_io.StringIO object at 0x7f21bc705000> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_initialize0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_initialize0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_initialize0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc7540a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:30.655 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_initialize0/templates'], 'log_level': 'DEBUG'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_initialize0/templates'], 'log_level': 'DEBUG'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_initialize0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_initialize0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_initialize0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_initialize0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_initialize0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_initialize0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_initialize0/templates'], 'log_level': 'DEBUG'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_initialize0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_initialize0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_initialize0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_initialize0/templates'], 'log_level': 'DEBUG'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_initialize0/templates'], 'log_level': 'DEBUG'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_initialize0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_initialize0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_initialize0/config/jupyter_server_config.json _ ERROR at setup of test_instance_creation_with_argv[mock_trait-test mock trait-jp_argv0] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--MockExtensionApp.mock_trait=test mock trait'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc66ac00> jp_server_config = {'MockExtensionApp': {'log_level': 'DEBUG', 'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0/templates']}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--MockExtensionApp.mock_trait=test mock trait'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'MockExtensionApp': {'log_level': 'DEBUG', 'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} config = {'MockExtensionApp': {'log_level': 'DEBUG', 'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0/templates']}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} default_token = '28dcf83e' environ = None http_port = 42595 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc668900> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42595 jp_logging_stream = <_io.StringIO object at 0x7f21bc705780> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--MockExtensionApp.mock_trait=test mock trait'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--MockExtensionApp.mock_trait=test mock trait'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--MockExtensionApp.mock_trait=test mock trait'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7bb3cf0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:30.753 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0/templates'], 'log_level': 'DEBUG'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0/templates'], 'log_level': 'DEBUG'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0/templates'], 'log_level': 'DEBUG', 'mock_trait': DeferredConfigString('test mock trait')}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0/templates'], 'log_level': 'DEBUG', 'mock_trait': DeferredConfigString('test mock trait')}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0/templates'], 'log_level': 'DEBUG', 'mock_trait': DeferredConfigString('test mock trait')}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_instance_creation_with_ar0/config/jupyter_server_config.json _____________ ERROR at setup of test_extensionapp_load_config_file _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc66b6a0> jp_server_config = {'MockExtensionApp': {'log_level': 'DEBUG', 'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0/templates']}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'MockExtensionApp': {'log_level': 'DEBUG', 'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} config = {'MockExtensionApp': {'log_level': 'DEBUG', 'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0/templates']}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} default_token = '2b902d98' environ = None http_port = 40983 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc669580> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40983 jp_logging_stream = <_io.StringIO object at 0x7f21bc704700> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7bb3430> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:30.843 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0/templates'], 'log_level': 'DEBUG'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0/templates'], 'log_level': 'DEBUG'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0/templates'], 'log_level': 'DEBUG'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0/templates'], 'log_level': 'DEBUG'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0/templates'], 'log_level': 'DEBUG'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extensionapp_load_config_0/config/jupyter_server_config.json ____________________ ERROR at setup of test_stop_extension _____________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc5dcf40> jp_server_config = {'MockExtensionApp': {'log_level': 'DEBUG', 'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0/templates']}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'MockExtensionApp': {'log_level': 'DEBUG', 'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} config = {'MockExtensionApp': {'log_level': 'DEBUG', 'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0/templates']}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} default_token = '12143915' environ = None http_port = 36795 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc5dcea0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36795 jp_logging_stream = <_io.StringIO object at 0x7f21bc620d00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7f1b7f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:31.550 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0/templates'], 'log_level': 'DEBUG'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0/templates'], 'log_level': 'DEBUG'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0/templates'], 'log_level': 'DEBUG'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0/templates'], 'log_level': 'DEBUG'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0/templates'], 'log_level': 'DEBUG'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_stop_extension0/config/jupyter_server_config.json ________________________ ERROR at setup of test_events _________________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7fcc360> jp_server_config = {'MockExtensionApp': {'log_level': 'DEBUG', 'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_events0/templates']}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'MockExtensionApp': {'log_level': 'DEBUG', 'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_events0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} config = {'MockExtensionApp': {'log_level': 'DEBUG', 'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_events0/templates']}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} default_token = '06bc9af1' environ = None http_port = 44409 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7fcc540> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44409 jp_logging_stream = <_io.StringIO object at 0x7f21bc6219c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_events0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_events0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_events0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7f19d10> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:31.650 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_events0/templates'], 'log_level': 'DEBUG'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_events0/templates'], 'log_level': 'DEBUG'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_events0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_events0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_events0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_events0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_events0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_events0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_events0/templates'], 'log_level': 'DEBUG'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_events0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_events0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_events0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_events0/templates'], 'log_level': 'DEBUG'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_events0/templates'], 'log_level': 'DEBUG'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_events0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_events0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_events0/config/jupyter_server_config.json ________________________ ERROR at setup of test_handler ________________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7fccfe0> jp_server_config = {'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler0/templates']}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} config = {'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler0/templates']}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} default_token = '1b7ae57d' environ = None http_port = 40077 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7fcd120> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40077 jp_logging_stream = <_io.StringIO object at 0x7f21bc621f00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_handler0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_handler0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_handler0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7f1a4e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:32.243 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_handler0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_handler0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_handler0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_handler0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_handler0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_handler0/config/jupyter_server_config.json ___________________ ERROR at setup of test_handler_template ____________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7fceac0> jp_server_config = {'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler_template0/templates']}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler_template0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} config = {'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler_template0/templates']}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} default_token = '45592601' environ = None http_port = 40825 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7fced40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40825 jp_logging_stream = <_io.StringIO object at 0x7f21bc6231c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_handler_template0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_handler_template0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_handler_template0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7f53110> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:32.338 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler_template0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler_template0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_handler_template0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_handler_template0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_handler_template0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_template0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_template0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_template0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler_template0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_template0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_template0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_template0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler_template0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler_template0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_handler_template0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_handler_template0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_handler_template0/config/jupyter_server_config.json ________ ERROR at setup of test_handler_gets_blocked[jp_server_config0] ________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7fcf4c0> jp_server_config = {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} config = {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} default_token = 'd4afc2f7' environ = None http_port = 44705 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7fce0c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44705 jp_logging_stream = <_io.StringIO object at 0x7f21bc623580> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_handler_gets_blocked_jp_s0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_handler_gets_blocked_jp_s0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_handler_gets_blocked_jp_s0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7f1ba70> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:32.428 ServerApp] Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_handler_gets_blocked_jp_s0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_handler_gets_blocked_jp_s0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_handler_gets_blocked_jp_s0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_gets_blocked_jp_s0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_gets_blocked_jp_s0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_gets_blocked_jp_s0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_gets_blocked_jp_s0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_gets_blocked_jp_s0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_gets_blocked_jp_s0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'allow_unauthenticated_access': False, 'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_handler_gets_blocked_jp_s0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_handler_gets_blocked_jp_s0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_handler_gets_blocked_jp_s0/config/jupyter_server_config.json __________ ERROR at setup of test_handler_setting[jp_server_config0] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7d60680> jp_server_config = {'MockExtensionApp': {'mock_trait': 'test mock trait'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'MockExtensionApp': {'mock_trait': 'test mock trait'}, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} config = {'MockExtensionApp': {'mock_trait': 'test mock trait'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} default_token = 'fd5f069b' environ = None http_port = 43891 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7d60f40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43891 jp_logging_stream = <_io.StringIO object at 0x7f21b7d38a00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_handler_setting_jp_server0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_handler_setting_jp_server0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_handler_setting_jp_server0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7d3f7f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:32.623 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'mock_trait': 'test mock trait'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'mock_trait': 'test mock trait'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_handler_setting_jp_server0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_handler_setting_jp_server0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_handler_setting_jp_server0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_setting_jp_server0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_setting_jp_server0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_setting_jp_server0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'mock_trait': 'test mock trait'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_setting_jp_server0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_setting_jp_server0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_setting_jp_server0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'mock_trait': 'test mock trait'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'mock_trait': 'test mock trait'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_handler_setting_jp_server0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_handler_setting_jp_server0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_handler_setting_jp_server0/config/jupyter_server_config.json ________________ ERROR at setup of test_handler_argv[jp_argv0] _________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--MockExtensionApp.mock_trait=test mock trait'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7d628e0> jp_server_config = {'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0/templates']}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--MockExtensionApp.mock_trait=test mock trait'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} config = {'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0/templates']}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} default_token = '5405fdd8' environ = None http_port = 41227 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7d61a80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41227 jp_logging_stream = <_io.StringIO object at 0x7f21b7d38b80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--MockExtensionApp.mock_trait=test mock trait'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--MockExtensionApp.mock_trait=test mock trait'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--MockExtensionApp.mock_trait=test mock trait'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7dd09b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:32.721 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0/templates'], 'mock_trait': DeferredConfigString('test mock trait')}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0/templates'], 'mock_trait': DeferredConfigString('test mock trait')}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0/templates'], 'mock_trait': DeferredConfigString('test mock trait')}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_handler_argv_jp_argv0_0/config/jupyter_server_config.json _______ ERROR at setup of test_base_url[jp_server_config0-/test_prefix/] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7d63240> jp_server_config = {'MockExtensionApp': {'mock_trait': 'test mock trait'}, 'ServerApp': {'base_url': 'test_prefix', 'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/test_prefix/' c = {'IdentityProvider': {'token': }, 'MockExtensionApp': {'mock_trait': 'test mock trait'}, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'base_url': 'test_prefix', 'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} config = {'MockExtensionApp': {'mock_trait': 'test mock trait'}, 'ServerApp': {'base_url': 'test_prefix', 'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.extension.mockextensions': True}}} default_token = '2061c9c8' environ = None http_port = 40699 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7d61e40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40699 jp_logging_stream = <_io.StringIO object at 0x7f21b7d3a8c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_base_url_jp_server_config0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_base_url_jp_server_config0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_base_url_jp_server_config0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7d1e120> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:32.811 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}, 'base_url': 'test_prefix'}, 'MockExtensionApp': {'mock_trait': 'test mock trait'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}, 'base_url': 'test_prefix'}, 'MockExtensionApp': {'mock_trait': 'test mock trait'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_base_url_jp_server_config0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_base_url_jp_server_config0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_base_url_jp_server_config0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_base_url_jp_server_config0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_base_url_jp_server_config0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_base_url_jp_server_config0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}, 'base_url': 'test_prefix'}, 'MockExtensionApp': {'mock_trait': 'test mock trait'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_base_url_jp_server_config0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_base_url_jp_server_config0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_base_url_jp_server_config0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}, 'base_url': 'test_prefix'}, 'MockExtensionApp': {'mock_trait': 'test mock trait'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}, 'base_url': 'test_prefix'}, 'MockExtensionApp': {'mock_trait': 'test mock trait'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_base_url_jp_server_config0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_base_url_jp_server_config0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_base_url_jp_server_config0/config/jupyter_server_config.json _________________ ERROR at setup of test_extension_manager_api _________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7ec8e00> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '031fb6af' environ = None http_port = 36529 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7ec8360> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36529 jp_logging_stream = <_io.StringIO object at 0x7f21b7d3a5c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_api0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_api0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_api0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7e9fc50> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:34.519 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_api0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_api0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_api0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_api0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_api0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_api0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_api0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_api0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_api0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_api0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_api0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_api0/config/jupyter_server_config.json __________ ERROR at setup of test_extension_manager_linked_extensions __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7ec9da0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '816d2dfe' environ = None http_port = 34719 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7eca020> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34719 jp_logging_stream = <_io.StringIO object at 0x7f21b7d39180> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_linked_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_linked_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_linked_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7d1c410> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:34.604 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_linked_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_linked_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_linked_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_linked_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_linked_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_linked_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_linked_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_linked_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_linked_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_linked_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_linked_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_linked_0/config/jupyter_server_config.json ___________ ERROR at setup of test_extension_manager_fail_add[True] ____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7eca8e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '34a45e8d' environ = None http_port = 37973 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7ec91c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37973 jp_logging_stream = <_io.StringIO object at 0x7f21b7d3b400> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7e06ee0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:34.688 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad0/config/jupyter_server_config.json ___________ ERROR at setup of test_extension_manager_fail_add[False] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7ecb2e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'eefb0b3a' environ = None http_port = 36475 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7ec9940> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36475 jp_logging_stream = <_io.StringIO object at 0x7f21b7d3ac80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7e9d4a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:34.781 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_ad1/config/jupyter_server_config.json ___________ ERROR at setup of test_extension_manager_fail_link[True] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7ecbce0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '18582a93' environ = None http_port = 36015 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7eca2a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36015 jp_logging_stream = <_io.StringIO object at 0x7f21b7d3ad40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7e07d40> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:34.866 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li0/config/jupyter_server_config.json __________ ERROR at setup of test_extension_manager_fail_link[False] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7ec99e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '3abbefcb' environ = None http_port = 40145 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7ecb380> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40145 jp_logging_stream = <_io.StringIO object at 0x7f21b7e08c40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7ed7480> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:34.958 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_li1/config/jupyter_server_config.json ___________ ERROR at setup of test_extension_manager_fail_load[True] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7b6c180> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '7f33dafb' environ = None http_port = 46853 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7b6c360> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46853 jp_logging_stream = <_io.StringIO object at 0x7f21b7e09300> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7e05b80> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:35.045 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo0/config/jupyter_server_config.json __________ ERROR at setup of test_extension_manager_fail_load[False] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7b6db20> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'e0829ea7' environ = None http_port = 40441 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7b6ccc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40441 jp_logging_stream = <_io.StringIO object at 0x7f21b7e09900> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7ed5c70> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:35.133 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_extension_manager_fail_lo1/config/jupyter_server_config.json ________________ ERROR at setup of test_disable_no_import[True] ________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7b6e520> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '3e25b560' environ = None http_port = 39487 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7b6d120> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39487 jp_logging_stream = <_io.StringIO object at 0x7f21b7e09780> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_True_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_True_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_True_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7beb700> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:35.229 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_True_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_True_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_True_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_True_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_True_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_True_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_True_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_True_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_True_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_True_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_True_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_True_0/config/jupyter_server_config.json _______________ ERROR at setup of test_disable_no_import[False] ________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7b6ee80> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '941c3d12' environ = None http_port = 34917 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7b6d9e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34917 jp_logging_stream = <_io.StringIO object at 0x7f21b7e08700> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_False_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_False_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_False_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7be8410> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:35.315 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_False_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_False_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_False_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_False_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_False_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_False_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_False_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_False_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_False_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_False_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_False_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_disable_no_import_False_0/config/jupyter_server_config.json ____________ ERROR at setup of test_load_ordered[jp_server_config0] ____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7b6ed40> jp_server_config = {'ServerApp': {'jpserver_extensions': OrderedDict([('tests.extension.mockextensions.mock2', True), ('tests.extension.mockextensions.mock1', True), ('jupyter_server_terminals', True)])}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': OrderedDict([('tests.extension.mockextensions.mock2', True), ('tests.extension.mockextensions.mock1', True), ('jupyter_server_terminals', True)])}} config = {'ServerApp': {'jpserver_extensions': OrderedDict([('tests.extension.mockextensions.mock2', True), ('tests.extension.mockextensions.mock1', True), ('jupyter_server_terminals', True)])}} default_token = '9a4f027e' environ = None http_port = 43405 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7b6f6a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43405 jp_logging_stream = <_io.StringIO object at 0x7f21b7e09000> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_load_ordered_jp_server_co0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_load_ordered_jp_server_co0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_load_ordered_jp_server_co0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7b66cb0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:36.073 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': OrderedDict({'tests.extension.mockextensions.mock2': True, 'tests.extension.mockextensions.mock1': True, 'jupyter_server_terminals': True})}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': OrderedDict({'tests.extension.mockextensions.mock2': True, 'tests.extension.mockextensions.mock1': True, 'jupyter_server_terminals': True})}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_load_ordered_jp_server_co0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_load_ordered_jp_server_co0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_load_ordered_jp_server_co0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_load_ordered_jp_server_co0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_load_ordered_jp_server_co0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_load_ordered_jp_server_co0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': OrderedDict({'tests.extension.mockextensions.mock2': True, 'tests.extension.mockextensions.mock1': True, 'jupyter_server_terminals': True})}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_load_ordered_jp_server_co0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_load_ordered_jp_server_co0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_load_ordered_jp_server_co0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': OrderedDict({'tests.extension.mockextensions.mock2': True, 'tests.extension.mockextensions.mock1': True, 'jupyter_server_terminals': True})}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': OrderedDict({'tests.extension.mockextensions.mock2': True, 'tests.extension.mockextensions.mock1': True, 'jupyter_server_terminals': True})}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_load_ordered_jp_server_co0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_load_ordered_jp_server_co0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_load_ordered_jp_server_co0/config/jupyter_server_config.json _______________________ ERROR at setup of test_get_spec ________________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7bced40> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'bd3ef106' environ = None http_port = 40739 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7bcd120> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40739 jp_logging_stream = <_io.StringIO object at 0x7f21b7b8c7c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_spec0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_spec0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_spec0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7ba4eb0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:36.195 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_spec0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_spec0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_spec0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_spec0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_spec0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_spec0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_spec0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_spec0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_spec0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_spec0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_spec0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_spec0/config/jupyter_server_config.json ______________________ ERROR at setup of test_get_status _______________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7bcf560> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '9f9c6f67' environ = None http_port = 46253 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7bcef20> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46253 jp_logging_stream = <_io.StringIO object at 0x7f21b7b8c4c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_status0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_status0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_status0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7b65950> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:36.288 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_status0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_status0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_status0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_status0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_status0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_status0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_status0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_status0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_status0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_status0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_status0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_status0/config/jupyter_server_config.json _____________ ERROR at setup of test_identity[identity0-expected0] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7bcf060> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'd1c04793' environ = None http_port = 38667 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7bcfa60> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38667 jp_logging_stream = <_io.StringIO object at 0x7f21b7e0af80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_identity_identity0_expect0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_identity0_expect0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_identity0_expect0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7b3ed50> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:36.380 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_identity_identity0_expect0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_identity0_expect0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_identity0_expect0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_identity0_expect0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_identity0_expect0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_identity0_expect0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_identity0_expect0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_identity0_expect0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_identity0_expect0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_identity0_expect0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_identity0_expect0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_identity0_expect0/config/jupyter_server_config.json _____________ ERROR at setup of test_identity[identity1-expected1] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7cd8180> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '4b6df1f1' environ = None http_port = 41493 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7cd8360> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41493 jp_logging_stream = <_io.StringIO object at 0x7f21b7b8d240> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_identity_identity1_expect0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_identity1_expect0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_identity1_expect0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7ba5d10> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:36.554 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_identity_identity1_expect0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_identity1_expect0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_identity1_expect0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_identity1_expect0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_identity1_expect0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_identity1_expect0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_identity1_expect0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_identity1_expect0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_identity1_expect0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_identity1_expect0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_identity1_expect0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_identity1_expect0/config/jupyter_server_config.json __________________ ERROR at setup of test_identity[None-403] ___________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7cd9b20> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '9b2dc622' environ = None http_port = 37625 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7cd8cc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37625 jp_logging_stream = <_io.StringIO object at 0x7f21b7b8c880> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_identity_None_403_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_None_403_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_None_403_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7b3ccd0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:36.645 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_identity_None_403_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_None_403_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_None_403_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_None_403_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_None_403_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_None_403_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_None_403_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_None_403_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_None_403_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_None_403_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_None_403_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_None_403_0/config/jupyter_server_config.json ________ ERROR at setup of test_identity_permissions[*-None-expected0] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7cd9ee0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '525d6da2' environ = None http_port = 34251 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7cd8ea0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34251 jp_logging_stream = <_io.StringIO object at 0x7f21b7b8e680> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___No0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___No0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___No0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7c83390> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:36.742 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___No0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___No0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___No0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___No0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___No0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___No0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___No0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___No0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___No0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___No0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___No0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___No0/config/jupyter_server_config.json _ ERROR at setup of test_identity_permissions[have_permissions1-check_permissions1-expected1] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7cd9300> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '02d96e51' environ = None http_port = 33317 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7cd9120> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33317 jp_logging_stream = <_io.StringIO object at 0x7f21b7b8e440> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions_have0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions_have0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions_have0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7b3fb10> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:36.835 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions_have0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions_have0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions_have0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions_have0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions_have0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions_have0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions_have0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions_have0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions_have0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions_have0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions_have0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions_have0/config/jupyter_server_config.json _ ERROR at setup of test_identity_permissions[*-check_permissions2-expected2] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7cdb420> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '7ba778b6' environ = None http_port = 40329 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7cd9da0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40329 jp_logging_stream = <_io.StringIO object at 0x7f21b7b8d000> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___ch0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___ch0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___ch0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7c82260> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:36.930 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___ch0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___ch0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___ch0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___ch0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___ch0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___ch0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___ch0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___ch0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___ch0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___ch0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___ch0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_permissions___ch0/config/jupyter_server_config.json ______________ ERROR at setup of test_identity_bad_permissions[] _______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7cd8a40> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '82b87c42' environ = None http_port = 39533 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7cda660> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39533 jp_logging_stream = <_io.StringIO object at 0x7f21b7b8c580> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7cc30c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:37.023 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_0/config/jupyter_server_config.json _____________ ERROR at setup of test_identity_bad_permissions[[]] ______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7cd9bc0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'ac1ba356' environ = None http_port = 43505 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7cdbba0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43505 jp_logging_stream = <_io.StringIO object at 0x7f21b7b8e200> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7c830c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:37.115 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_1/config/jupyter_server_config.json ____________ ERROR at setup of test_identity_bad_permissions["abc"] ____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7cad1c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'e629240b' environ = None http_port = 39237 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7cac720> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39237 jp_logging_stream = <_io.StringIO object at 0x7f21b7b8f4c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7c7b2f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:37.218 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_2/config/jupyter_server_config.json ___ ERROR at setup of test_identity_bad_permissions[{"resource": "action"}] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7cae0c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '768f2a11' environ = None http_port = 43625 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7caccc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43625 jp_logging_stream = <_io.StringIO object at 0x7f21b7c60ac0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7c81270> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:37.311 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_3/config/jupyter_server_config.json ______ ERROR at setup of test_identity_bad_permissions[{"resource": [5]}] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7caeac0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '959cf304' environ = None http_port = 41981 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7cad080> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41981 jp_logging_stream = <_io.StringIO object at 0x7f21b7c610c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7cc0b90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:37.409 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_4/config/jupyter_server_config.json ______ ERROR at setup of test_identity_bad_permissions[{"resource": {}}] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7caf4c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'ec837813' environ = None http_port = 38361 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7cada80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38361 jp_logging_stream = <_io.StringIO object at 0x7f21b7c616c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7c785f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:37.500 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_identity_bad_permissions_5/config/jupyter_server_config.json ________________ ERROR at setup of test_create_retrieve_config _________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7cae3e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'd22aeec9' environ = None http_port = 46637 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7cae200> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46637 jp_logging_stream = <_io.StringIO object at 0x7f21b7c61540> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_retrieve_config0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_retrieve_config0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_retrieve_config0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7c105f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:37.591 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_retrieve_config0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_retrieve_config0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_retrieve_config0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_retrieve_config0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_retrieve_config0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_retrieve_config0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_retrieve_config0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_retrieve_config0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_retrieve_config0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_retrieve_config0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_retrieve_config0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_retrieve_config0/config/jupyter_server_config.json ________________________ ERROR at setup of test_modify _________________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7cae2a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '0f250344' environ = None http_port = 40715 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7caf600> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40715 jp_logging_stream = <_io.StringIO object at 0x7f21b7c60100> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_modify0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7c12da0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:37.691 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_modify0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify0/config/jupyter_server_config.json ______________________ ERROR at setup of test_get_unknown ______________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7774220> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '4e93c3ca' environ = None http_port = 41547 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b77744a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41547 jp_logging_stream = <_io.StringIO object at 0x7f21b7c60d00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_unknown0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_unknown0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_unknown0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b77eefd0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:37.782 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_unknown0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_unknown0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_unknown0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_unknown0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_unknown0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_unknown0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_unknown0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_unknown0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_unknown0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_unknown0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_unknown0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_unknown0/config/jupyter_server_config.json ______ ERROR at setup of test_list_notebooks[FileContentsManager--inroot] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7774cc0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '590e84b7' environ = None http_port = 40653 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7774ae0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40653 jp_logging_stream = <_io.StringIO object at 0x7f21b7c619c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b77ec730> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:37.883 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten0/config/jupyter_server_config.json _ ERROR at setup of test_list_notebooks[FileContentsManager-Directory with spaces in-inspace] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b77753a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '194ef7b1' environ = None http_port = 33501 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7774fe0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33501 jp_logging_stream = <_io.StringIO object at 0x7f21b7c61fc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b77ec550> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:37.977 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten1/config/jupyter_server_config.json _ ERROR at setup of test_list_notebooks[FileContentsManager-unicod\xe9-innonascii] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b77771a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '6df53459' environ = None http_port = 38055 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7776160> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38055 jp_logging_stream = <_io.StringIO object at 0x7f21b7c625c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b77ab750> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:38.072 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten2/config/jupyter_server_config.json _______ ERROR at setup of test_list_notebooks[FileContentsManager-foo-a] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7775ee0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'd331f153' environ = None http_port = 36511 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7776c00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36511 jp_logging_stream = <_io.StringIO object at 0x7f21b7c62e00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b77a8e60> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:38.167 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten3/config/jupyter_server_config.json _______ ERROR at setup of test_list_notebooks[FileContentsManager-foo-b] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7777ba0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'b2ec8d40' environ = None http_port = 39389 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b77b0220> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39389 jp_logging_stream = <_io.StringIO object at 0x7f21b7c63640> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b77aac10> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:38.261 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten4/config/jupyter_server_config.json _ ERROR at setup of test_list_notebooks[FileContentsManager-foo-name with spaces] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b77b1b20> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '9132dc14' environ = None http_port = 42561 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b77b04a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42561 jp_logging_stream = <_io.StringIO object at 0x7f21b773d000> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7797bb0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:38.495 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten5/config/jupyter_server_config.json __ ERROR at setup of test_list_notebooks[FileContentsManager-foo-unicod\xe9] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b77b2840> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '1b540e47' environ = None http_port = 40189 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b77b09a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40189 jp_logging_stream = <_io.StringIO object at 0x7f21b773c580> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten6/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten6/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten6') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b77abde0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:38.589 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten6/config/jupyter_server_config.json ____ ERROR at setup of test_list_notebooks[FileContentsManager-foo/bar-baz] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b77b3560> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'b797a77b' environ = None http_port = 45587 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b77b0ea0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45587 jp_logging_stream = <_io.StringIO object at 0x7f21b773c280> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten7/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten7/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7794f00> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:38.695 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten7/config/jupyter_server_config.json ____ ERROR at setup of test_list_notebooks[FileContentsManager-ordering-A] _____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b77b2a20> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '755e8040' environ = None http_port = 33763 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b77b2980> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33763 jp_logging_stream = <_io.StringIO object at 0x7f21b773ca00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten8/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten8/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten8') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b77700a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:38.791 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten8/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten8/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten8/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten8/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten8/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten8/config/jupyter_server_config.json ____ ERROR at setup of test_list_notebooks[FileContentsManager-ordering-b] _____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b780c040> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'bdf21ffb' environ = None http_port = 44691 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b780c2c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44691 jp_logging_stream = <_io.StringIO object at 0x7f21b773d480> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten9/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten9/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten9') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b77950e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:38.887 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten9/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten9/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten9/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten9/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten9/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten9/config/jupyter_server_config.json ____ ERROR at setup of test_list_notebooks[FileContentsManager-ordering-C] _____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b780dc60> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '1677bc75' environ = None http_port = 44515 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b780ce00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44515 jp_logging_stream = <_io.StringIO object at 0x7f21b773da80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten10/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten10/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten10') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b78ff390> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:38.983 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten10/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten10/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten10/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten10/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten10/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten10/config/jupyter_server_config.json ___ ERROR at setup of test_list_notebooks[FileContentsManager-\xe5 b-\xe7 d] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b780e8e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '32da0530' environ = None http_port = 38127 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b780c900> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38127 jp_logging_stream = <_io.StringIO object at 0x7f21b773e080> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten11/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten11/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten11') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7772580> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:39.078 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten11/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten11/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten11/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten11/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten11/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_FileConten11/config/jupyter_server_config.json ___ ERROR at setup of test_list_notebooks[AsyncFileContentsManager--inroot] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b780e200> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '8b6105e5' environ = None http_port = 35837 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b780dda0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35837 jp_logging_stream = <_io.StringIO object at 0x7f21b773e680> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b78fc460> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:39.183 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC0/config/jupyter_server_config.json _ ERROR at setup of test_list_notebooks[AsyncFileContentsManager-Directory with spaces in-inspace] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b780eac0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '604dd03e' environ = None http_port = 36999 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b780d300> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36999 jp_logging_stream = <_io.StringIO object at 0x7f21b773ec80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b78c31b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:39.278 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC1/config/jupyter_server_config.json _ ERROR at setup of test_list_notebooks[AsyncFileContentsManager-unicod\xe9-innonascii] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b781c0e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '7cdb43f7' environ = None http_port = 44477 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b781c2c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44477 jp_logging_stream = <_io.StringIO object at 0x7f21b773f280> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b78fdb80> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:39.376 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC2/config/jupyter_server_config.json ____ ERROR at setup of test_list_notebooks[AsyncFileContentsManager-foo-a] _____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b781d580> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '5484afaa' environ = None http_port = 32801 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b781cae0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 32801 jp_logging_stream = <_io.StringIO object at 0x7f21b773f7c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b78c1400> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:39.469 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC3/config/jupyter_server_config.json ____ ERROR at setup of test_list_notebooks[AsyncFileContentsManager-foo-b] _____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b781e340> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'a80b6e64' environ = None http_port = 42607 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b781cc20> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42607 jp_logging_stream = <_io.StringIO object at 0x7f21b78384c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b789d8b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:39.563 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC4/config/jupyter_server_config.json _ ERROR at setup of test_list_notebooks[AsyncFileContentsManager-foo-name with spaces] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b781d440> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'b33e101d' environ = None http_port = 46543 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b781d300> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46543 jp_logging_stream = <_io.StringIO object at 0x7f21b7838b80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b78c0ff0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:39.668 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC5/config/jupyter_server_config.json _ ERROR at setup of test_list_notebooks[AsyncFileContentsManager-foo-unicod\xe9] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b781fa60> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '2b65b57d' environ = None http_port = 34001 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b781e660> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34001 jp_logging_stream = <_io.StringIO object at 0x7f21b7838400> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC6/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC6/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC6') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b78db890> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:39.763 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC6/config/jupyter_server_config.json _ ERROR at setup of test_list_notebooks[AsyncFileContentsManager-foo/bar-baz] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b781e840> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '49757b3e' environ = None http_port = 43915 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b781f240> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43915 jp_logging_stream = <_io.StringIO object at 0x7f21b78387c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC7/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC7/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b789dbd0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:39.865 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC7/config/jupyter_server_config.json __ ERROR at setup of test_list_notebooks[AsyncFileContentsManager-ordering-A] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b79e8220> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'e2e464b9' environ = None http_port = 34411 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b79e8400> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34411 jp_logging_stream = <_io.StringIO object at 0x7f21b7838ac0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC8/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC8/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC8') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b78db070> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:39.958 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC8/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC8/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC8/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC8/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC8/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC8/config/jupyter_server_config.json __ ERROR at setup of test_list_notebooks[AsyncFileContentsManager-ordering-b] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b79e8c20> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '0176e677' environ = None http_port = 33097 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b79e8a40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33097 jp_logging_stream = <_io.StringIO object at 0x7f21b7839000> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC9/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC9/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC9') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b79fbed0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:40.055 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC9/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC9/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC9/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC9/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC9/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC9/config/jupyter_server_config.json __ ERROR at setup of test_list_notebooks[AsyncFileContentsManager-ordering-C] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b79e91c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '5e52d629' environ = None http_port = 43829 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b79e8fe0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43829 jp_logging_stream = <_io.StringIO object at 0x7f21b7839600> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC10/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC10/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC10') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b78dbe80> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:40.149 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC10/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC10/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC10/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC10/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC10/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC10/config/jupyter_server_config.json _ ERROR at setup of test_list_notebooks[AsyncFileContentsManager-\xe5 b-\xe7 d] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b79eb240> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'c4f6c047' environ = None http_port = 39467 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b79e85e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39467 jp_logging_stream = <_io.StringIO object at 0x7f21b7839c00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC11/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC11/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC11') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b79f8cd0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:40.243 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC11/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC11/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC11/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC11/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC11/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_notebooks_AsyncFileC11/config/jupyter_server_config.json ___ ERROR at setup of test_get_dir_no_contents[FileContentsManager--inroot] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b79ebe20> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'd00108cb' environ = None http_port = 39509 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b79e9a80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39509 jp_logging_stream = <_io.StringIO object at 0x7f21b783a200> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b79755e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:40.453 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC0/config/jupyter_server_config.json _ ERROR at setup of test_get_dir_no_contents[FileContentsManager-Directory with spaces in-inspace] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b79eb7e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '2ca9ca52' environ = None http_port = 45283 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b79ebf60> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45283 jp_logging_stream = <_io.StringIO object at 0x7f21b783a800> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b79fa530> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:40.543 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC1/config/jupyter_server_config.json _ ERROR at setup of test_get_dir_no_contents[FileContentsManager-unicod\xe9-innonascii] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b79b58a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '855e9c49' environ = None http_port = 41315 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b79b40e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41315 jp_logging_stream = <_io.StringIO object at 0x7f21b7918e80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b79745f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:40.642 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC2/config/jupyter_server_config.json ____ ERROR at setup of test_get_dir_no_contents[FileContentsManager-foo-a] _____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b79b6480> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'df0aff22' environ = None http_port = 39079 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b79b65c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39079 jp_logging_stream = <_io.StringIO object at 0x7f21b7918400> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7951950> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:40.733 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC3/config/jupyter_server_config.json ____ ERROR at setup of test_get_dir_no_contents[FileContentsManager-foo-b] _____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b79b6ca0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '9ea31a5d' environ = None http_port = 37349 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b79b5c60> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37349 jp_logging_stream = <_io.StringIO object at 0x7f21b7918040> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7952e40> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:40.827 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC4/config/jupyter_server_config.json _ ERROR at setup of test_get_dir_no_contents[FileContentsManager-foo-name with spaces] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b79b68e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '2745ba47' environ = None http_port = 42175 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b79b5f80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42175 jp_logging_stream = <_io.StringIO object at 0x7f21b7918880> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b79f75c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:40.917 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC5/config/jupyter_server_config.json _ ERROR at setup of test_get_dir_no_contents[FileContentsManager-foo-unicod\xe9] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b79b5e40> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '0bed58ba' environ = None http_port = 38053 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b79b7ce0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38053 jp_logging_stream = <_io.StringIO object at 0x7f21b7919300> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC6/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC6/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC6') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b79518b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:41.007 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC6/config/jupyter_server_config.json _ ERROR at setup of test_get_dir_no_contents[FileContentsManager-foo/bar-baz] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7a018a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'f56a7851' environ = None http_port = 39121 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7a00a40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39121 jp_logging_stream = <_io.StringIO object at 0x7f21b7919900> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC7/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC7/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b79f68f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:41.107 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC7/config/jupyter_server_config.json __ ERROR at setup of test_get_dir_no_contents[FileContentsManager-ordering-A] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7a02520> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '11bdd94b' environ = None http_port = 38975 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7a007c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38975 jp_logging_stream = <_io.StringIO object at 0x7f21b7919f00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC8/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC8/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC8') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7a87de0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:41.198 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC8/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC8/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC8/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC8/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC8/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC8/config/jupyter_server_config.json __ ERROR at setup of test_get_dir_no_contents[FileContentsManager-ordering-b] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7a032e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '08949ece' environ = None http_port = 35963 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7a01ee0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35963 jp_logging_stream = <_io.StringIO object at 0x7f21b791a500> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC9/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC9/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC9') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b79f4910> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:41.294 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC9/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC9/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC9/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC9/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC9/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC9/config/jupyter_server_config.json __ ERROR at setup of test_get_dir_no_contents[FileContentsManager-ordering-C] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7a02ac0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '9ecb73cd' environ = None http_port = 45155 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7a02700> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45155 jp_logging_stream = <_io.StringIO object at 0x7f21b791ab00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC10/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC10/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC10') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7a86a80> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:41.387 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC10/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC10/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC10/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC10/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC10/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC10/config/jupyter_server_config.json _ ERROR at setup of test_get_dir_no_contents[FileContentsManager-\xe5 b-\xe7 d] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7a03880> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '8887124d' environ = None http_port = 44753 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7a64180> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44753 jp_logging_stream = <_io.StringIO object at 0x7f21b791b100> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC11/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC11/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC11') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7a5b390> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:41.481 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC11/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC11/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC11/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC11/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC11/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_FileC11/config/jupyter_server_config.json _ ERROR at setup of test_get_dir_no_contents[AsyncFileContentsManager--inroot] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7a64c20> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '064f9e48' environ = None http_port = 44099 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7a647c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44099 jp_logging_stream = <_io.StringIO object at 0x7f21b791b700> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7a87ac0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:41.584 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async0/config/jupyter_server_config.json _ ERROR at setup of test_get_dir_no_contents[AsyncFileContentsManager-Directory with spaces in-inspace] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7a66700> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'a5567d60' environ = None http_port = 34415 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7a64900> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34415 jp_logging_stream = <_io.StringIO object at 0x7f21b7a2d0c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7a5b250> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:41.679 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async1/config/jupyter_server_config.json _ ERROR at setup of test_get_dir_no_contents[AsyncFileContentsManager-unicod\xe9-innonascii] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7a65da0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '30a5853c' environ = None http_port = 39577 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7a65580> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39577 jp_logging_stream = <_io.StringIO object at 0x7f21b7a2c340> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7acd680> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:41.781 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async2/config/jupyter_server_config.json __ ERROR at setup of test_get_dir_no_contents[AsyncFileContentsManager-foo-a] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7a67ec0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '64d7a15d' environ = None http_port = 44255 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7a66ac0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44255 jp_logging_stream = <_io.StringIO object at 0x7f21b7a2c640> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7a87390> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:41.879 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async3/config/jupyter_server_config.json __ ERROR at setup of test_get_dir_no_contents[AsyncFileContentsManager-foo-b] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7a65f80> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'a2e150c4' environ = None http_port = 39653 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7a676a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39653 jp_logging_stream = <_io.StringIO object at 0x7f21b7a2cf40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5a0ebc0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:41.976 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async4/config/jupyter_server_config.json _ ERROR at setup of test_get_dir_no_contents[AsyncFileContentsManager-foo-name with spaces] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5a44680> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '58615e8e' environ = None http_port = 33213 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5a44860> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33213 jp_logging_stream = <_io.StringIO object at 0x7f21b7a2c280> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7acf3e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:42.069 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async5/config/jupyter_server_config.json _ ERROR at setup of test_get_dir_no_contents[AsyncFileContentsManager-foo-unicod\xe9] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5a46020> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '75040afc' environ = None http_port = 42407 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5a451c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42407 jp_logging_stream = <_io.StringIO object at 0x7f21b7a2ce80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async6/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async6/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async6') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5a0e3a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:42.162 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async6/config/jupyter_server_config.json _ ERROR at setup of test_get_dir_no_contents[AsyncFileContentsManager-foo/bar-baz] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5a46980> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '52c1b64d' environ = None http_port = 42257 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5a44ea0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42257 jp_logging_stream = <_io.StringIO object at 0x7f21b7a2d480> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async7/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async7/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5a63020> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:42.414 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async7/config/jupyter_server_config.json _ ERROR at setup of test_get_dir_no_contents[AsyncFileContentsManager-ordering-A] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5a459e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '5d01c423' environ = None http_port = 44517 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5a458a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44517 jp_logging_stream = <_io.StringIO object at 0x7f21b7a2da80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async8/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async8/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async8') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5a0cc30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:42.511 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async8/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async8/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async8/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async8/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async8/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async8/config/jupyter_server_config.json _ ERROR at setup of test_get_dir_no_contents[AsyncFileContentsManager-ordering-b] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5a45ee0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'b6f328bd' environ = None http_port = 33657 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5a44ae0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33657 jp_logging_stream = <_io.StringIO object at 0x7f21b7a2e080> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async9/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async9/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async9') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5a0f0c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:42.617 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async9/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async9/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async9/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async9/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async9/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async9/config/jupyter_server_config.json _ ERROR at setup of test_get_dir_no_contents[AsyncFileContentsManager-ordering-C] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5a463e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '061f2620' environ = None http_port = 39427 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5a47a60> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39427 jp_logging_stream = <_io.StringIO object at 0x7f21b7a2e680> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async10/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async10/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async10') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5a872f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:42.714 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async10/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async10/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async10/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async10/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async10/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async10/config/jupyter_server_config.json _ ERROR at setup of test_get_dir_no_contents[AsyncFileContentsManager-\xe5 b-\xe7 d] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b74e4860> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'e23f8d11' environ = None http_port = 43169 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b74e45e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43169 jp_logging_stream = <_io.StringIO object at 0x7f21b5af4880> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async11/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async11/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async11') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5a616d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:42.812 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async11/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async11/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async11/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async11/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async11/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_dir_no_contents_Async11/config/jupyter_server_config.json _______ ERROR at setup of test_list_nonexistant_dir[FileContentsManager] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b74e5ee0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '460cef20' environ = None http_port = 43367 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b74e4ea0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43367 jp_logging_stream = <_io.StringIO object at 0x7f21b5af4580> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_File0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_File0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_File0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5a86f30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:42.908 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_File0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_File0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_File0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_File0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_File0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_File0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_File0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_File0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_File0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_File0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_File0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_File0/config/jupyter_server_config.json ____ ERROR at setup of test_list_nonexistant_dir[AsyncFileContentsManager] _____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b74e6f20> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '1ceff26a' environ = None http_port = 45763 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b74e4d60> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45763 jp_logging_stream = <_io.StringIO object at 0x7f21b5af4c40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_Asyn0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_Asyn0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_Asyn0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b74d4140> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:43.005 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_Asyn0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_Asyn0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_Asyn0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_Asyn0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_Asyn0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_Asyn0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_Asyn0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_Asyn0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_Asyn0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_Asyn0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_Asyn0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_nonexistant_dir_Asyn0/config/jupyter_server_config.json _____ ERROR at setup of test_get_nb_contents[FileContentsManager--inroot] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b74e7b00> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '5e7549d4' environ = None http_port = 43091 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b74e6700> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43091 jp_logging_stream = <_io.StringIO object at 0x7f21b5af44c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5a864e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:43.111 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte0/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_contents[FileContentsManager-Directory with spaces in-inspace] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b74e7380> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'ca9e7536' environ = None http_port = 35851 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b74e74c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35851 jp_logging_stream = <_io.StringIO object at 0x7f21b5af5180> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b74d4a50> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:43.208 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte1/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_contents[FileContentsManager-unicod\xe9-innonascii] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7489300> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'cd554ac1' environ = None http_port = 42809 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7489440> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42809 jp_logging_stream = <_io.StringIO object at 0x7f21b5af4b80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7474280> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:43.313 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte2/config/jupyter_server_config.json ______ ERROR at setup of test_get_nb_contents[FileContentsManager-foo-a] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7489bc0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '8495c4d5' environ = None http_port = 45885 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7488b80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45885 jp_logging_stream = <_io.StringIO object at 0x7f21b5af5d80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7477160> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:43.410 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte3/config/jupyter_server_config.json ______ ERROR at setup of test_get_nb_contents[FileContentsManager-foo-b] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b748ad40> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '4886eaf5' environ = None http_port = 38745 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7489940> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38745 jp_logging_stream = <_io.StringIO object at 0x7f21b5af6380> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b747be80> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:43.508 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte4/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_contents[FileContentsManager-foo-name with spaces] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b748b920> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '2c4e9065' environ = None http_port = 32977 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b74896c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 32977 jp_logging_stream = <_io.StringIO object at 0x7f21b5af6980> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5a87610> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:43.617 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte5/config/jupyter_server_config.json __ ERROR at setup of test_get_nb_contents[FileContentsManager-foo-unicod\xe9] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b748b100> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '16f59e2b' environ = None http_port = 45325 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b748b880> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45325 jp_logging_stream = <_io.StringIO object at 0x7f21b5af6f80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte6/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte6/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte6') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7479950> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:43.713 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte6/config/jupyter_server_config.json ___ ERROR at setup of test_get_nb_contents[FileContentsManager-foo/bar-baz] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b754cf40> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '1b0ef8ec' environ = None http_port = 41731 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b754c4a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41731 jp_logging_stream = <_io.StringIO object at 0x7f21b5af7580> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte7/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte7/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b75073e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:43.817 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte7/config/jupyter_server_config.json ____ ERROR at setup of test_get_nb_contents[FileContentsManager-ordering-A] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b754e160> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'baa13289' environ = None http_port = 44547 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b754cd60> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44547 jp_logging_stream = <_io.StringIO object at 0x7f21b75f8f40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte8/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte8/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte8') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7479630> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:43.911 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte8/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte8/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte8/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte8/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte8/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte8/config/jupyter_server_config.json ____ ERROR at setup of test_get_nb_contents[FileContentsManager-ordering-b] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b754ede0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'd400be5b' environ = None http_port = 35697 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b754cae0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35697 jp_logging_stream = <_io.StringIO object at 0x7f21b75f84c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte9/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte9/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte9') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7504780> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:44.007 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte9/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte9/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte9/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte9/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte9/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte9/config/jupyter_server_config.json ____ ERROR at setup of test_get_nb_contents[FileContentsManager-ordering-C] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b754fb00> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '810c169d' environ = None http_port = 35359 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b754d4e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35359 jp_logging_stream = <_io.StringIO object at 0x7f21b75f81c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte10/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte10/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte10') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7577a20> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:44.104 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte10/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte10/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte10/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte10/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte10/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte10/config/jupyter_server_config.json __ ERROR at setup of test_get_nb_contents[FileContentsManager-\xe5 b-\xe7 d] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b754f380> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '8d92835d' environ = None http_port = 35259 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b754fce0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35259 jp_logging_stream = <_io.StringIO object at 0x7f21b75f8940> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte11/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte11/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte11') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7506440> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:44.201 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte11/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte11/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte11/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte11/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte11/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_FileConte11/config/jupyter_server_config.json ___ ERROR at setup of test_get_nb_contents[AsyncFileContentsManager--inroot] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b76856c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'a7b502e5' environ = None http_port = 37413 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7684180> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37413 jp_logging_stream = <_io.StringIO object at 0x7f21b75f93c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7575400> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:44.460 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile0/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_contents[AsyncFileContentsManager-Directory with spaces in-inspace] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7684e00> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '82cec1f9' environ = None http_port = 45673 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7684c20> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45673 jp_logging_stream = <_io.StringIO object at 0x7f21b75f99c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b75d4960> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:44.558 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile1/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_contents[AsyncFileContentsManager-unicod\xe9-innonascii] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7686e80> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '4bb8e0b7' environ = None http_port = 45195 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7684d60> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45195 jp_logging_stream = <_io.StringIO object at 0x7f21b75f9fc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b75d44b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:44.667 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile2/config/jupyter_server_config.json ____ ERROR at setup of test_get_nb_contents[AsyncFileContentsManager-foo-a] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b76879c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '9d577662' environ = None http_port = 43275 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b76865c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43275 jp_logging_stream = <_io.StringIO object at 0x7f21b75f9900> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b75d4280> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:44.764 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile3/config/jupyter_server_config.json ____ ERROR at setup of test_get_nb_contents[AsyncFileContentsManager-foo-b] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7685120> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'b8ba713d' environ = None http_port = 40975 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b76863e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40975 jp_logging_stream = <_io.StringIO object at 0x7f21b75f9f00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b768ea30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:44.862 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile4/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_contents[AsyncFileContentsManager-foo-name with spaces] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b76a0220> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'ee81048e' environ = None http_port = 36655 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b76a0400> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36655 jp_logging_stream = <_io.StringIO object at 0x7f21b75fa500> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b768f2a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:44.958 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile5/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_contents[AsyncFileContentsManager-foo-unicod\xe9] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b76a16c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'a612d5fd' environ = None http_port = 39929 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b76a0c20> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39929 jp_logging_stream = <_io.StringIO object at 0x7f21b75fab00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile6/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile6/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile6') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b76efbb0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:45.055 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile6/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_contents[AsyncFileContentsManager-foo/bar-baz] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b76a1080> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '1426e066' environ = None http_port = 37057 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b76a0ea0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37057 jp_logging_stream = <_io.StringIO object at 0x7f21b7661180> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile7/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile7/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5a0fbb0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:45.161 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile7/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_contents[AsyncFileContentsManager-ordering-A] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b76a1580> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'f1e03b6c' environ = None http_port = 36921 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b76a1440> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36921 jp_logging_stream = <_io.StringIO object at 0x7f21b7660400> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile8/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile8/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile8') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b76ec730> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:45.258 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile8/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile8/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile8/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile8/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile8/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile8/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_contents[AsyncFileContentsManager-ordering-b] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b76a2700> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'fe50a428' environ = None http_port = 45115 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b76a2480> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45115 jp_logging_stream = <_io.StringIO object at 0x7f21b7660700> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile9/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile9/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile9') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b76cbe30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:45.361 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile9/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile9/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile9/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile9/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile9/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile9/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_contents[AsyncFileContentsManager-ordering-C] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b76a0b80> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '4f69c293' environ = None http_port = 45861 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b76a3560> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45861 jp_logging_stream = <_io.StringIO object at 0x7f21b7661000> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile10/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile10/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile10') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b76ed5e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:45.456 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile10/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile10/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile10/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile10/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile10/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile10/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_contents[AsyncFileContentsManager-\xe5 b-\xe7 d] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b732c540> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '82c2d679' environ = None http_port = 33465 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b732c720> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33465 jp_logging_stream = <_io.StringIO object at 0x7f21b7660340> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile11/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile11/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile11') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b76ca0d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:45.552 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile11/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile11/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile11/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile11/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile11/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_contents_AsyncFile11/config/jupyter_server_config.json _______ ERROR at setup of test_get_nb_hash[FileContentsManager--inroot] ________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b732df80> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '8f5fe359' environ = None http_port = 40939 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b732d120> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40939 jp_logging_stream = <_io.StringIO object at 0x7f21b7660f40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b73a3ed0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:45.657 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM0/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_hash[FileContentsManager-Directory with spaces in-inspace] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b732d620> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '73a919ce' environ = None http_port = 32785 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b732d260> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 32785 jp_logging_stream = <_io.StringIO object at 0x7f21b7661540> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b76c88c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:45.751 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM1/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_hash[FileContentsManager-unicod\xe9-innonascii] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b732f420> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '210321ac' environ = None http_port = 38437 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b732e3e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38437 jp_logging_stream = <_io.StringIO object at 0x7f21b7661b40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b73a34d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:45.852 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM2/config/jupyter_server_config.json ________ ERROR at setup of test_get_nb_hash[FileContentsManager-foo-a] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b732e340> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'c1c786cc' environ = None http_port = 39743 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b732f1a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39743 jp_logging_stream = <_io.StringIO object at 0x7f21b7662e00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b739bed0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:45.947 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM3/config/jupyter_server_config.json ________ ERROR at setup of test_get_nb_hash[FileContentsManager-foo-b] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b592c2c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '530b95f1' environ = None http_port = 41765 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b592c4a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41765 jp_logging_stream = <_io.StringIO object at 0x7f21b7663400> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7398b90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:46.044 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM4/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_hash[FileContentsManager-foo-name with spaces] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b592dda0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '9b38b3e3' environ = None http_port = 34915 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b592c720> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34915 jp_logging_stream = <_io.StringIO object at 0x7f21b7364dc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b594b110> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:46.139 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM5/config/jupyter_server_config.json ____ ERROR at setup of test_get_nb_hash[FileContentsManager-foo-unicod\xe9] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b592eac0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '64d04e1e' environ = None http_port = 42217 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b592c9a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42217 jp_logging_stream = <_io.StringIO object at 0x7f21b7364700> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM6/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM6/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM6') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b739a0d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:46.234 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM6/config/jupyter_server_config.json _____ ERROR at setup of test_get_nb_hash[FileContentsManager-foo/bar-baz] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b592f880> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '714714e0' environ = None http_port = 41469 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b592e480> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41469 jp_logging_stream = <_io.StringIO object at 0x7f21b7364100> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM7/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM7/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5948fa0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:46.472 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM7/config/jupyter_server_config.json ______ ERROR at setup of test_get_nb_hash[FileContentsManager-ordering-A] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b592e520> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '9bad62e2' environ = None http_port = 40199 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b592f1a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40199 jp_logging_stream = <_io.StringIO object at 0x7f21b73647c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM8/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM8/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM8') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b59492c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:46.566 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM8/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM8/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM8/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM8/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM8/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM8/config/jupyter_server_config.json ______ ERROR at setup of test_get_nb_hash[FileContentsManager-ordering-b] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b59802c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'b9071575' environ = None http_port = 39475 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b59804a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39475 jp_logging_stream = <_io.StringIO object at 0x7f21b7365240> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM9/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM9/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM9') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b59cc1e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:46.666 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM9/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM9/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM9/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM9/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM9/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM9/config/jupyter_server_config.json ______ ERROR at setup of test_get_nb_hash[FileContentsManager-ordering-C] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5981e40> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '4cbc252b' environ = None http_port = 34081 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5980fe0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34081 jp_logging_stream = <_io.StringIO object at 0x7f21b7365840> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM10/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM10/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM10') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b59ceda0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:46.755 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM10/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM10/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM10/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM10/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM10/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM10/config/jupyter_server_config.json ____ ERROR at setup of test_get_nb_hash[FileContentsManager-\xe5 b-\xe7 d] _____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5982b60> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '8fb4c6c6' environ = None http_port = 43301 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5981760> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43301 jp_logging_stream = <_io.StringIO object at 0x7f21b7365e40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM11/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM11/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM11') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b59733e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:46.848 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM11/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM11/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM11/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM11/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM11/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_FileContentsM11/config/jupyter_server_config.json _____ ERROR at setup of test_get_nb_hash[AsyncFileContentsManager--inroot] _____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b59837e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'e8420d83' environ = None http_port = 41953 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b59811c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41953 jp_logging_stream = <_io.StringIO object at 0x7f21b7366440> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b59cfac0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:46.939 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont0/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_hash[AsyncFileContentsManager-Directory with spaces in-inspace] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5982020> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '70097b2a' environ = None http_port = 41575 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5983060> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41575 jp_logging_stream = <_io.StringIO object at 0x7f21b7366a40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5972f80> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:47.030 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont1/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_hash[AsyncFileContentsManager-unicod\xe9-innonascii] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5983ce0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '24f59e8c' environ = None http_port = 46109 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5850220> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46109 jp_logging_stream = <_io.StringIO object at 0x7f21b7367040> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5873d90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:47.129 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont2/config/jupyter_server_config.json ______ ERROR at setup of test_get_nb_hash[AsyncFileContentsManager-foo-a] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5851940> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'ac374286' environ = None http_port = 36125 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b58502c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36125 jp_logging_stream = <_io.StringIO object at 0x7f21b7366980> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b739a120> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:47.220 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont3/config/jupyter_server_config.json ______ ERROR at setup of test_get_nb_hash[AsyncFileContentsManager-foo-b] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b58523e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'fed55240' environ = None http_port = 44509 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5850860> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44509 jp_logging_stream = <_io.StringIO object at 0x7f21b587d000> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5872440> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:47.315 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont4/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_hash[AsyncFileContentsManager-foo-name with spaces] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b58513a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '7ed3da67' environ = None http_port = 41627 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5851260> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41627 jp_logging_stream = <_io.StringIO object at 0x7f21b587c280> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b58f67b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:47.405 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont5/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_hash[AsyncFileContentsManager-foo-unicod\xe9] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5852520> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '098cfcdd' environ = None http_port = 43681 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5851da0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43681 jp_logging_stream = <_io.StringIO object at 0x7f21b587c580> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont6/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont6/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont6') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b58f7250> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:47.499 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont6/config/jupyter_server_config.json ___ ERROR at setup of test_get_nb_hash[AsyncFileContentsManager-foo/bar-baz] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5850e00> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '9b1c9748' environ = None http_port = 45035 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5853380> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45035 jp_logging_stream = <_io.StringIO object at 0x7f21b587ce80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont7/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont7/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b58c3f20> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:47.605 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont7/config/jupyter_server_config.json ___ ERROR at setup of test_get_nb_hash[AsyncFileContentsManager-ordering-A] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b56a82c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'dc9cba8e' environ = None http_port = 39485 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b56a84a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39485 jp_logging_stream = <_io.StringIO object at 0x7f21b587c1c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont8/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont8/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont8') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b58c0cd0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:47.699 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont8/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont8/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont8/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont8/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont8/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont8/config/jupyter_server_config.json ___ ERROR at setup of test_get_nb_hash[AsyncFileContentsManager-ordering-b] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b56a8cc0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '647f8cee' environ = None http_port = 33355 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b56a8ae0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33355 jp_logging_stream = <_io.StringIO object at 0x7f21b587cdc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont9/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont9/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont9') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b58c0fa0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:47.798 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont9/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont9/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont9/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont9/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont9/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont9/config/jupyter_server_config.json ___ ERROR at setup of test_get_nb_hash[AsyncFileContentsManager-ordering-C] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b56a9260> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '374f9e9d' environ = None http_port = 39191 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b56a9080> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39191 jp_logging_stream = <_io.StringIO object at 0x7f21b587d3c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont10/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont10/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont10') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b58a8370> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:47.891 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont10/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont10/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont10/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont10/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont10/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont10/config/jupyter_server_config.json __ ERROR at setup of test_get_nb_hash[AsyncFileContentsManager-\xe5 b-\xe7 d] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b56a9e40> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'b8534a0b' environ = None http_port = 41609 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b56a9b20> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41609 jp_logging_stream = <_io.StringIO object at 0x7f21b587d9c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont11/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont11/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont11') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b58c2c60> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:47.984 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont11/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont11/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont11/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont11/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont11/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_hash_AsyncFileCont11/config/jupyter_server_config.json ____ ERROR at setup of test_get_nb_no_contents[FileContentsManager--inroot] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b56abec0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '68eb0acb' environ = None http_port = 40207 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b56a8a40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40207 jp_logging_stream = <_io.StringIO object at 0x7f21b587dfc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b58aae90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:48.079 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo0/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_no_contents[FileContentsManager-Directory with spaces in-inspace] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b56ab880> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '8ccc4920' environ = None http_port = 39443 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b56cc040> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39443 jp_logging_stream = <_io.StringIO object at 0x7f21b587e5c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b56d3d40> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:48.174 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo1/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_no_contents[FileContentsManager-unicod\xe9-innonascii] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b56cd9e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '54ecd167' environ = None http_port = 46795 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b56ccb80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46795 jp_logging_stream = <_io.StringIO object at 0x7f21b587f7c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b58abca0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:48.445 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo2/config/jupyter_server_config.json _____ ERROR at setup of test_get_nb_no_contents[FileContentsManager-foo-a] _____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b56ce160> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '7c76283b' environ = None http_port = 36893 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b56cd120> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36893 jp_logging_stream = <_io.StringIO object at 0x7f21b5640400> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b56d2670> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:48.541 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo3/config/jupyter_server_config.json _____ ERROR at setup of test_get_nb_no_contents[FileContentsManager-foo-b] _____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b56cf240> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '7280a96e' environ = None http_port = 43315 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b56cde40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43315 jp_logging_stream = <_io.StringIO object at 0x7f21b5640b80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b569d9f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:48.648 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo4/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_no_contents[FileContentsManager-foo-name with spaces] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b56cfec0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '86aabfd4' environ = None http_port = 37039 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b56ceac0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37039 jp_logging_stream = <_io.StringIO object at 0x7f21b56404c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b56d3fc0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:48.744 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo5/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_no_contents[FileContentsManager-foo-unicod\xe9] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b56cf600> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'dffbbb6b' environ = None http_port = 39001 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b56cfd80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39001 jp_logging_stream = <_io.StringIO object at 0x7f21b56410c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo6/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo6/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo6') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b569d400> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:48.844 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo6/config/jupyter_server_config.json __ ERROR at setup of test_get_nb_no_contents[FileContentsManager-foo/bar-baz] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b55318a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'ce035d97' environ = None http_port = 37919 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5530220> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37919 jp_logging_stream = <_io.StringIO object at 0x7f21b56416c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo7/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo7/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b55281e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:48.941 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo7/config/jupyter_server_config.json __ ERROR at setup of test_get_nb_no_contents[FileContentsManager-ordering-A] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b55325c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '19d38fa3' environ = None http_port = 35189 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5530720> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35189 jp_logging_stream = <_io.StringIO object at 0x7f21b5641cc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo8/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo8/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo8') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b569c820> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:49.037 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo8/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo8/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo8/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo8/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo8/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo8/config/jupyter_server_config.json __ ERROR at setup of test_get_nb_no_contents[FileContentsManager-ordering-b] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b55332e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'c5b43de2' environ = None http_port = 33349 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5530c20> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33349 jp_logging_stream = <_io.StringIO object at 0x7f21b56422c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo9/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo9/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo9') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b552bac0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:49.145 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo9/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo9/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo9/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo9/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo9/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo9/config/jupyter_server_config.json __ ERROR at setup of test_get_nb_no_contents[FileContentsManager-ordering-C] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5532ca0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '31e0d23b' environ = None http_port = 45941 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b55328e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45941 jp_logging_stream = <_io.StringIO object at 0x7f21b56428c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo10/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo10/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo10') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5581a90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:49.242 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo10/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo10/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo10/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo10/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo10/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo10/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_no_contents[FileContentsManager-\xe5 b-\xe7 d] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b55339c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '26986343' environ = None http_port = 44481 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b57cc220> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44481 jp_logging_stream = <_io.StringIO object at 0x7f21b5642ec0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo11/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo11/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo11') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5580690> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:49.345 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo11/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo11/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo11/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo11/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo11/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_FileCo11/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_no_contents[AsyncFileContentsManager--inroot] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b57cccc0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '34aaf003' environ = None http_port = 34309 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b57cc860> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34309 jp_logging_stream = <_io.StringIO object at 0x7f21b56434c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b55ced50> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:49.442 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF0/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_no_contents[AsyncFileContentsManager-Directory with spaces in-inspace] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b57cd300> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'f6686bee' environ = None http_port = 45223 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b57cd120> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45223 jp_logging_stream = <_io.StringIO object at 0x7f21b57d4e80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5582490> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:49.540 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF1/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_no_contents[AsyncFileContentsManager-unicod\xe9-innonascii] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b57cdee0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '58730838' environ = None http_port = 35213 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b57cdd00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35213 jp_logging_stream = <_io.StringIO object at 0x7f21b57d4040> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b55cfcf0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:49.646 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF2/config/jupyter_server_config.json __ ERROR at setup of test_get_nb_no_contents[AsyncFileContentsManager-foo-a] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b57cff60> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '032de161' environ = None http_port = 38421 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b57ceb60> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38421 jp_logging_stream = <_io.StringIO object at 0x7f21b57d4400> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5767340> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:49.742 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF3/config/jupyter_server_config.json __ ERROR at setup of test_get_nb_no_contents[AsyncFileContentsManager-foo-b] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b57cd580> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'd9ced1f4' environ = None http_port = 43463 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b57cf740> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43463 jp_logging_stream = <_io.StringIO object at 0x7f21b57d4d00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b55cf070> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:49.847 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF4/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_no_contents[AsyncFileContentsManager-foo-name with spaces] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b57e8720> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '20a03d19' environ = None http_port = 43393 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b57e8900> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43393 jp_logging_stream = <_io.StringIO object at 0x7f21b57d4100> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5766170> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:49.942 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF5/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_no_contents[AsyncFileContentsManager-foo-unicod\xe9] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b57ea0c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '99447372' environ = None http_port = 35749 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b57e9260> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35749 jp_logging_stream = <_io.StringIO object at 0x7f21b57d4c40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF6/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF6/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF6') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b573e490> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:50.040 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF6/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_no_contents[AsyncFileContentsManager-foo/bar-baz] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b57e9580> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'ef6f339e' environ = None http_port = 46615 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b57e93a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46615 jp_logging_stream = <_io.StringIO object at 0x7f21b57d5240> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF7/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF7/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b573f2a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:50.136 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF7/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_no_contents[AsyncFileContentsManager-ordering-A] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b57e9a80> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '92380f71' environ = None http_port = 35337 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b57e9940> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35337 jp_logging_stream = <_io.StringIO object at 0x7f21b57d5840> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF8/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF8/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF8') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b57d2bc0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:50.232 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF8/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF8/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF8/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF8/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF8/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF8/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_no_contents[AsyncFileContentsManager-ordering-b] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b57e9f80> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'f594bbe1' environ = None http_port = 40625 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b57e8f40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40625 jp_logging_stream = <_io.StringIO object at 0x7f21b57d5e40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF9/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF9/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF9') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b573e210> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:50.503 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF9/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF9/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF9/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF9/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF9/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF9/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_no_contents[AsyncFileContentsManager-ordering-C] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b57e8a40> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '1e7abe20' environ = None http_port = 43299 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21be3f4040> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43299 jp_logging_stream = <_io.StringIO object at 0x7f21b57d6440> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF10/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF10/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF10') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b57d04b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:50.597 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF10/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF10/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF10/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF10/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF10/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF10/config/jupyter_server_config.json _ ERROR at setup of test_get_nb_no_contents[AsyncFileContentsManager-\xe5 b-\xe7 d] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21be3f4900> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '7e0224c7' environ = None http_port = 41651 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21be3f4680> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41651 jp_logging_stream = <_io.StringIO object at 0x7f21b57d6a40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF11/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF11/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF11') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21be382fd0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:50.701 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF11/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF11/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF11/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF11/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF11/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_no_contents_AsyncF11/config/jupyter_server_config.json __________ ERROR at setup of test_get_nb_invalid[FileContentsManager] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21be3f6480> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '5f1b5f15' environ = None http_port = 45911 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21be3f5080> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45911 jp_logging_stream = <_io.StringIO object at 0x7f21be3f10c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_FileConten0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_FileConten0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_FileConten0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b57d1b30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:50.796 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_FileConten0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_FileConten0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_FileConten0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_FileConten0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_FileConten0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_FileConten0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_FileConten0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_FileConten0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_FileConten0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_FileConten0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_FileConten0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_FileConten0/config/jupyter_server_config.json _______ ERROR at setup of test_get_nb_invalid[AsyncFileContentsManager] ________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21be3f7060> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '3ddaf2ff' environ = None http_port = 43061 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21be3f5c60> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43061 jp_logging_stream = <_io.StringIO object at 0x7f21be3f0340> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_AsyncFileC0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_AsyncFileC0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_AsyncFileC0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21be383b10> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:50.892 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_AsyncFileC0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_AsyncFileC0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_AsyncFileC0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_AsyncFileC0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_AsyncFileC0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_AsyncFileC0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_AsyncFileC0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_AsyncFileC0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_AsyncFileC0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_AsyncFileC0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_AsyncFileC0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nb_invalid_AsyncFileC0/config/jupyter_server_config.json ____ ERROR at setup of test_get_contents_no_such_file[FileContentsManager] _____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21be3f7ba0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '6ebb842e' environ = None http_port = 44543 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21be3f67a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44543 jp_logging_stream = <_io.StringIO object at 0x7f21be3f0640> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21be417520> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:50.986 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file0/config/jupyter_server_config.json __ ERROR at setup of test_get_contents_no_such_file[AsyncFileContentsManager] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21be3f7420> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'e7f303e6' environ = None http_port = 35327 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21be3f7560> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35327 jp_logging_stream = <_io.StringIO object at 0x7f21be3f0ac0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21be380320> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:51.082 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_contents_no_such_file1/config/jupyter_server_config.json __ ERROR at setup of test_get_text_file_contents[FileContentsManager--inroot] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b53604a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'c9469815' environ = None http_port = 40389 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5360680> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40389 jp_logging_stream = <_io.StringIO object at 0x7f21be3f0280> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21be3828f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:51.186 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi0/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_contents[FileContentsManager-Directory with spaces in-inspace] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5361080> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'e68ed1df' environ = None http_port = 38435 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5360cc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38435 jp_logging_stream = <_io.StringIO object at 0x7f21be3f1b40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b53a09b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:51.281 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi1/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_contents[FileContentsManager-unicod\xe9-innonascii] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5362980> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'c7ccb07f' environ = None http_port = 33169 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5361940> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33169 jp_logging_stream = <_io.StringIO object at 0x7f21be3f1480> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5582df0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:51.378 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi2/config/jupyter_server_config.json ___ ERROR at setup of test_get_text_file_contents[FileContentsManager-foo-a] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5363600> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '939783e0' environ = None http_port = 40117 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b53625c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40117 jp_logging_stream = <_io.StringIO object at 0x7f21be3f2740> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b53a1720> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:51.471 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi3/config/jupyter_server_config.json ___ ERROR at setup of test_get_text_file_contents[FileContentsManager-foo-b] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5363100> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '471e34d1' environ = None http_port = 43935 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b53634c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43935 jp_logging_stream = <_io.StringIO object at 0x7f21be3f2d40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b53b8320> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:51.564 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi4/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_contents[FileContentsManager-foo-name with spaces] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b52d9440> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '492a6f17' environ = None http_port = 36043 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b52d85e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36043 jp_logging_stream = <_io.StringIO object at 0x7f21be3f3340> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b53a11d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:51.668 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi5/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_contents[FileContentsManager-foo-unicod\xe9] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b52d9d00> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '1a999dfb' environ = None http_port = 45601 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b52d8cc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45601 jp_logging_stream = <_io.StringIO object at 0x7f21b5318880> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi6/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi6/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi6') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b53cff20> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:51.762 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi6/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_contents[FileContentsManager-foo/bar-baz] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b52dade0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '0ed0557d' environ = None http_port = 45921 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b52d99e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45921 jp_logging_stream = <_io.StringIO object at 0x7f21b53184c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi7/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi7/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b57d0c30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:51.861 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi7/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_contents[FileContentsManager-ordering-A] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b52dba60> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '3978d674' environ = None http_port = 40269 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b52d9760> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40269 jp_logging_stream = <_io.StringIO object at 0x7f21b5318c40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi8/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi8/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi8') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b53ce3a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:51.955 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi8/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi8/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi8/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi8/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi8/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi8/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_contents[FileContentsManager-ordering-b] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b52db240> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'f992bbcf' environ = None http_port = 40061 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b52db9c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40061 jp_logging_stream = <_io.StringIO object at 0x7f21b5318580> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi9/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi9/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi9') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b52fb200> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:52.048 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi9/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi9/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi9/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi9/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi9/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi9/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_contents[FileContentsManager-ordering-C] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5251580> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '10da6b52' environ = None http_port = 43947 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5250720> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43947 jp_logging_stream = <_io.StringIO object at 0x7f21b5319180> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi10/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi10/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi10') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b53cd9a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:52.141 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi10/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi10/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi10/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi10/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi10/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi10/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_contents[FileContentsManager-\xe5 b-\xe7 d] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b52522a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '4e159e99' environ = None http_port = 41593 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b52504a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41593 jp_logging_stream = <_io.StringIO object at 0x7f21b5319780> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi11/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi11/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi11') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b52fa800> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:52.234 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi11/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi11/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi11/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi11/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi11/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_Fi11/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_contents[AsyncFileContentsManager--inroot] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5253060> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '8985a541' environ = None http_port = 33703 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5250b80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33703 jp_logging_stream = <_io.StringIO object at 0x7f21b5319d80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b526b390> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:52.503 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As0/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_contents[AsyncFileContentsManager-Directory with spaces in-inspace] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5253c40> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'b909c9ce' environ = None http_port = 37405 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5251760> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37405 jp_logging_stream = <_io.StringIO object at 0x7f21b531a980> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b52f9720> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:52.596 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As1/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_contents[AsyncFileContentsManager-unicod\xe9-innonascii] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b52534c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '8ed5b686' environ = None http_port = 33677 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5253ba0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33677 jp_logging_stream = <_io.StringIO object at 0x7f21b531a380> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b526b840> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:52.696 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As2/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_contents[AsyncFileContentsManager-foo-a] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b50e44a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'c00c066d' environ = None http_port = 36515 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b50e4680> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36515 jp_logging_stream = <_io.StringIO object at 0x7f21b5319cc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5230280> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:52.790 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As3/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_contents[AsyncFileContentsManager-foo-b] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b50e4ea0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '709ac9f4' environ = None http_port = 36661 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b50e4cc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36661 jp_logging_stream = <_io.StringIO object at 0x7f21b531aa40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b52307d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:52.886 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As4/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_contents[AsyncFileContentsManager-foo-name with spaces] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b50e5440> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'a2829f5c' environ = None http_port = 45815 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b50e5260> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45815 jp_logging_stream = <_io.StringIO object at 0x7f21b508d000> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5027840> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:52.978 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As5/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_contents[AsyncFileContentsManager-foo-unicod\xe9] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b50e74c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '2d450110' environ = None http_port = 44887 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b50e53a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44887 jp_logging_stream = <_io.StringIO object at 0x7f21b508c280> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As6/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As6/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As6') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b526a6c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:53.071 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As6/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_contents[AsyncFileContentsManager-foo/bar-baz] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b50e7f60> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '53afa2b9' environ = None http_port = 42929 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b50e5800> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42929 jp_logging_stream = <_io.StringIO object at 0x7f21b508c580> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As7/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As7/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5025540> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:53.175 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As7/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_contents[AsyncFileContentsManager-ordering-A] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b50e5ee0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '1cd09632' environ = None http_port = 43823 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b50e7880> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43823 jp_logging_stream = <_io.StringIO object at 0x7f21b508ce80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As8/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As8/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As8') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b506ee90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:53.268 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As8/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As8/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As8/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As8/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As8/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As8/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_contents[AsyncFileContentsManager-ordering-b] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b50914e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '27076c2e' environ = None http_port = 41623 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5090180> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41623 jp_logging_stream = <_io.StringIO object at 0x7f21b508c1c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As9/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As9/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As9') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5026e90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:53.366 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As9/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As9/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As9/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As9/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As9/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As9/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_contents[AsyncFileContentsManager-ordering-C] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5092020> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '56e35c22' environ = None http_port = 39785 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5090540> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39785 jp_logging_stream = <_io.StringIO object at 0x7f21b508cdc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As10/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As10/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As10') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b506f160> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:53.459 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As10/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As10/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As10/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As10/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As10/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As10/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_contents[AsyncFileContentsManager-\xe5 b-\xe7 d] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b50909a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '0bd947f2' environ = None http_port = 35909 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5090f40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35909 jp_logging_stream = <_io.StringIO object at 0x7f21b508d3c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As11/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As11/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As11') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b50afe30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:53.554 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As11/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As11/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As11/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As11/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As11/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_contents_As11/config/jupyter_server_config.json ____ ERROR at setup of test_get_text_file_hash[FileContentsManager--inroot] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b50934c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'cf6ff2cc' environ = None http_port = 43045 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b5092480> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43045 jp_logging_stream = <_io.StringIO object at 0x7f21b508d9c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b50addb0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:53.657 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo0/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_hash[FileContentsManager-Directory with spaces in-inspace] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b5092f20> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'f0c6cf10' environ = None http_port = 34137 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b50932e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34137 jp_logging_stream = <_io.StringIO object at 0x7f21b508dfc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b50af9d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:53.750 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo1/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_hash[FileContentsManager-unicod\xe9-innonascii] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b51f4400> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '6563d874' environ = None http_port = 45733 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b51f45e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45733 jp_logging_stream = <_io.StringIO object at 0x7f21b508e5c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5113f70> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:53.847 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo2/config/jupyter_server_config.json _____ ERROR at setup of test_get_text_file_hash[FileContentsManager-foo-a] _____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b51f5da0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '0ccb180f' environ = None http_port = 45333 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b51f5ee0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45333 jp_logging_stream = <_io.StringIO object at 0x7f21b508f7c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b506ce60> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:53.939 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo3/config/jupyter_server_config.json _____ ERROR at setup of test_get_text_file_hash[FileContentsManager-foo-b] _____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b51f6b60> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '60ce2240' environ = None http_port = 41765 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b51f5760> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41765 jp_logging_stream = <_io.StringIO object at 0x7f21b5184400> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5110c30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:54.033 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo4/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_hash[FileContentsManager-foo-name with spaces] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b51f7740> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'cef76408' environ = None http_port = 33369 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b51f54e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33369 jp_logging_stream = <_io.StringIO object at 0x7f21b5184b80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b518bde0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:54.127 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo5/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_hash[FileContentsManager-foo-unicod\xe9] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b51f6160> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '9aa3f971' environ = None http_port = 38847 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b51f7880> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38847 jp_logging_stream = <_io.StringIO object at 0x7f21b51844c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo6/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo6/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo6') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b51106e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:54.222 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo6/config/jupyter_server_config.json __ ERROR at setup of test_get_text_file_hash[FileContentsManager-foo/bar-baz] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b54bc400> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '8cbb712f' environ = None http_port = 33451 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b54bc5e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33451 jp_logging_stream = <_io.StringIO object at 0x7f21b51850c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo7/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo7/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b518b200> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:54.497 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo7/config/jupyter_server_config.json __ ERROR at setup of test_get_text_file_hash[FileContentsManager-ordering-A] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b54bdf80> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'cbc91129' environ = None http_port = 32987 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b54bd120> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 32987 jp_logging_stream = <_io.StringIO object at 0x7f21b51856c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo8/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo8/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo8') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5163e30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:54.590 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo8/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo8/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo8/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo8/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo8/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo8/config/jupyter_server_config.json __ ERROR at setup of test_get_text_file_hash[FileContentsManager-ordering-b] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b54bec00> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'ed585b44' environ = None http_port = 40803 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b54bcea0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40803 jp_logging_stream = <_io.StringIO object at 0x7f21b5185cc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo9/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo9/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo9') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5160870> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:54.690 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo9/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo9/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo9/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo9/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo9/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo9/config/jupyter_server_config.json __ ERROR at setup of test_get_text_file_hash[FileContentsManager-ordering-C] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b54bf920> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'e9ce5787' environ = None http_port = 38115 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b54bd260> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38115 jp_logging_stream = <_io.StringIO object at 0x7f21b51862c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo10/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo10/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo10') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b542ee90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:54.785 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo10/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo10/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo10/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo10/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo10/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo10/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_hash[FileContentsManager-\xe5 b-\xe7 d] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b54bf1a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'cddcf015' environ = None http_port = 44025 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b54bfb00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44025 jp_logging_stream = <_io.StringIO object at 0x7f21b51868c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo11/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo11/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo11') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b5162d50> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:54.882 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo11/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo11/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo11/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo11/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo11/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_FileCo11/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_hash[AsyncFileContentsManager--inroot] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b54f14e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '392a2533' environ = None http_port = 35283 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b54f0220> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35283 jp_logging_stream = <_io.StringIO object at 0x7f21b5186ec0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b542c410> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:54.973 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF0/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_hash[AsyncFileContentsManager-Directory with spaces in-inspace] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b54f20c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '521b864f' environ = None http_port = 34591 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b54f02c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34591 jp_logging_stream = <_io.StringIO object at 0x7f21b51874c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b54f6e90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:55.064 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF1/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_hash[AsyncFileContentsManager-unicod\xe9-innonascii] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b54f1800> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'fad2c051' environ = None http_port = 42381 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b54f1620> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42381 jp_logging_stream = <_io.StringIO object at 0x7f21b54dce80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b542ccd0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:55.164 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF2/config/jupyter_server_config.json __ ERROR at setup of test_get_text_file_hash[AsyncFileContentsManager-foo-a] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b54f3880> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'ff31b048' environ = None http_port = 44911 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b54f2480> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44911 jp_logging_stream = <_io.StringIO object at 0x7f21b54dc040> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b54f66c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:55.257 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF3/config/jupyter_server_config.json __ ERROR at setup of test_get_text_file_hash[AsyncFileContentsManager-foo-b] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b54f2c00> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'cba4f131' environ = None http_port = 43015 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b54f1b20> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43015 jp_logging_stream = <_io.StringIO object at 0x7f21b54dc400> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b549b2a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:55.354 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF4/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_hash[AsyncFileContentsManager-foo-name with spaces] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b54f2fc0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '5eb7e64f' environ = None http_port = 42527 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b54b0220> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42527 jp_logging_stream = <_io.StringIO object at 0x7f21b54dcd00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b54f4960> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:55.445 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF5/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_hash[AsyncFileContentsManager-foo-unicod\xe9] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b54b14e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '249ff8ca' environ = None http_port = 41397 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b54b0a40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41397 jp_logging_stream = <_io.StringIO object at 0x7f21b54dc100> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF6/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF6/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF6') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b549acb0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:55.539 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF6/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_hash[AsyncFileContentsManager-foo/bar-baz] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b54b0ea0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '4cf6fb02' environ = None http_port = 38317 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b54b0cc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38317 jp_logging_stream = <_io.StringIO object at 0x7f21b54dcc40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF7/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF7/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b544cf00> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:55.645 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF7/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_hash[AsyncFileContentsManager-ordering-A] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b54b13a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'a3c6d1e5' environ = None http_port = 43397 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b54b1260> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43397 jp_logging_stream = <_io.StringIO object at 0x7f21b54dd240> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF8/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF8/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF8') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b549a120> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:55.737 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF8/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF8/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF8/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF8/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF8/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF8/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_hash[AsyncFileContentsManager-ordering-b] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b54b2520> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'aa147084' environ = None http_port = 46039 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b54b22a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46039 jp_logging_stream = <_io.StringIO object at 0x7f21b54dd840> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF9/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF9/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF9') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4fd6a30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:55.835 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF9/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF9/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF9/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF9/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF9/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF9/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_hash[AsyncFileContentsManager-ordering-C] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b54b09a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '82129d7e' environ = None http_port = 38281 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b54b3380> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38281 jp_logging_stream = <_io.StringIO object at 0x7f21b54dde40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF10/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF10/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF10') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b544e0d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:55.929 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF10/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF10/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF10/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF10/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF10/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF10/config/jupyter_server_config.json _ ERROR at setup of test_get_text_file_hash[AsyncFileContentsManager-\xe5 b-\xe7 d] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4f64360> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '6d322746' environ = None http_port = 37455 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4f64540> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37455 jp_logging_stream = <_io.StringIO object at 0x7f21b54de440> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF11/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF11/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF11') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4fd45f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:56.027 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF11/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF11/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF11/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF11/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF11/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_text_file_hash_AsyncF11/config/jupyter_server_config.json __________ ERROR at setup of test_get_404_hidden[FileContentsManager] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4f65da0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '59aa4c63' environ = None http_port = 35985 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4f64f40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35985 jp_logging_stream = <_io.StringIO object at 0x7f21b54dea40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_FileConten0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_FileConten0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_FileConten0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4faf480> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:56.121 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_FileConten0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_FileConten0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_FileConten0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_FileConten0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_FileConten0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_FileConten0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_FileConten0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_FileConten0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_FileConten0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_FileConten0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_FileConten0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_FileConten0/config/jupyter_server_config.json _______ ERROR at setup of test_get_404_hidden[AsyncFileContentsManager] ________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4f668e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '9e26bb44' environ = None http_port = 41459 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4f64c20> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41459 jp_logging_stream = <_io.StringIO object at 0x7f21b4f290c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_AsyncFileC0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_AsyncFileC0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_AsyncFileC0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4fad400> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:56.216 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_AsyncFileC0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_AsyncFileC0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_AsyncFileC0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_AsyncFileC0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_AsyncFileC0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_AsyncFileC0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_AsyncFileC0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_AsyncFileC0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_AsyncFileC0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_AsyncFileC0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_AsyncFileC0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_404_hidden_AsyncFileC0/config/jupyter_server_config.json _ ERROR at setup of test_get_binary_file_contents[FileContentsManager--inroot] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4f67420> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '30e67826' environ = None http_port = 37505 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4f65080> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37505 jp_logging_stream = <_io.StringIO object at 0x7f21b4f28640> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4fd5ef0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:56.489 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_0/config/jupyter_server_config.json _ ERROR at setup of test_get_binary_file_contents[FileContentsManager-Directory with spaces in-inspace] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4f66c00> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '9cbb0006' environ = None http_port = 45157 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4f662a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45157 jp_logging_stream = <_io.StringIO object at 0x7f21b4f28340> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4fb7ed0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:56.582 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_1/config/jupyter_server_config.json _ ERROR at setup of test_get_binary_file_contents[FileContentsManager-unicod\xe9-innonascii] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4d300e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '5c6d5e10' environ = None http_port = 43521 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4d302c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43521 jp_logging_stream = <_io.StringIO object at 0x7f21b4f28f40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4fd6490> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:56.680 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_2/config/jupyter_server_config.json __ ERROR at setup of test_get_binary_file_contents[FileContentsManager-foo-a] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4d31760> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '21883bf7' environ = None http_port = 38327 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4d30cc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38327 jp_logging_stream = <_io.StringIO object at 0x7f21b4f29540> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4fb5540> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:56.774 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_3/config/jupyter_server_config.json __ ERROR at setup of test_get_binary_file_contents[FileContentsManager-foo-b] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4d327a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '564c00f4' environ = None http_port = 36285 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4d30a40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36285 jp_logging_stream = <_io.StringIO object at 0x7f21b4f29b40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4dc3430> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:56.870 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_4/config/jupyter_server_config.json _ ERROR at setup of test_get_binary_file_contents[FileContentsManager-foo-name with spaces] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4d32020> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'd5993745' environ = None http_port = 41009 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4d31d00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41009 jp_logging_stream = <_io.StringIO object at 0x7f21b4f2a140> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4fb5bd0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:56.965 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_5/config/jupyter_server_config.json _ ERROR at setup of test_get_binary_file_contents[FileContentsManager-foo-unicod\xe9] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4d311c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '5ac688c9' environ = None http_port = 39559 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4d32ca0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39559 jp_logging_stream = <_io.StringIO object at 0x7f21b4f2a740> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_6/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_6/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_6') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4dc37a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:57.061 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_6/config/jupyter_server_config.json _ ERROR at setup of test_get_binary_file_contents[FileContentsManager-foo/bar-baz] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4d880e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'e0fecd35' environ = None http_port = 45005 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4d882c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45005 jp_logging_stream = <_io.StringIO object at 0x7f21b4f2ad40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_7/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_7/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4d7bde0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:57.167 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_7/config/jupyter_server_config.json _ ERROR at setup of test_get_binary_file_contents[FileContentsManager-ordering-A] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4d89bc0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '94d50ddd' environ = None http_port = 39803 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4d88540> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39803 jp_logging_stream = <_io.StringIO object at 0x7f21b4f2b340> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_8/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_8/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_8') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4dc0050> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:57.261 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_8/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_8/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_8/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_8/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_8/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_8/config/jupyter_server_config.json _ ERROR at setup of test_get_binary_file_contents[FileContentsManager-ordering-b] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4d8a8e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'aa02f904' environ = None http_port = 40787 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4d887c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40787 jp_logging_stream = <_io.StringIO object at 0x7f21b4dac880> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_9/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_9/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_9') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4d79ef0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:57.359 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_9/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_9/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_9/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_9/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_9/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_9/config/jupyter_server_config.json _ ERROR at setup of test_get_binary_file_contents[FileContentsManager-ordering-C] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4d8b600> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '951dd964' environ = None http_port = 44345 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4d891c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44345 jp_logging_stream = <_io.StringIO object at 0x7f21b4dac4c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_10/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_10/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_10') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4dd7fc0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:57.451 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_10/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_10/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_10/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_10/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_10/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_10/config/jupyter_server_config.json _ ERROR at setup of test_get_binary_file_contents[FileContentsManager-\xe5 b-\xe7 d] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4d8aca0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '4eedf3d3' environ = None http_port = 44371 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4d8b740> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44371 jp_logging_stream = <_io.StringIO object at 0x7f21b4dacc40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_11/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_11/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_11') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4dd4500> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:57.546 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_11/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_11/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_11/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_11/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_11/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_11/config/jupyter_server_config.json _ ERROR at setup of test_get_binary_file_contents[AsyncFileContentsManager--inroot] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4cf5080> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '869f6951' environ = None http_port = 37655 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4cf51c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37655 jp_logging_stream = <_io.StringIO object at 0x7f21b4dac580> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_12/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_12/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_12') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4d93e80> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:57.648 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_12/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_12/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_12/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_12/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_12/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_12/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_12/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_12/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_12/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_12/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_12/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_12/config/jupyter_server_config.json _ ERROR at setup of test_get_binary_file_contents[AsyncFileContentsManager-Directory with spaces in-inspace] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4cf5e40> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'f04e7a27' environ = None http_port = 44081 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4cf42c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44081 jp_logging_stream = <_io.StringIO object at 0x7f21b4dad780> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_13/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_13/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_13') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4dd4190> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:57.742 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_13/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_13/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_13/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_13/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_13/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_13/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_13/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_13/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_13/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_13/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_13/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_13/config/jupyter_server_config.json _ ERROR at setup of test_get_binary_file_contents[AsyncFileContentsManager-unicod\xe9-innonascii] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4cf56c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '91743a0e' environ = None http_port = 36847 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4cf53a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36847 jp_logging_stream = <_io.StringIO object at 0x7f21b4dad180> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_14/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_14/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_14') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4d903c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:57.842 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_14/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_14/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_14/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_14/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_14/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_14/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_14/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_14/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_14/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_14/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_14/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_14/config/jupyter_server_config.json _ ERROR at setup of test_get_binary_file_contents[AsyncFileContentsManager-foo-a] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4cf7740> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'a042cab5' environ = None http_port = 34995 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4cf6340> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34995 jp_logging_stream = <_io.StringIO object at 0x7f21b4dacb80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_15/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_15/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_15') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4c3d400> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:57.933 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_15/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_15/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_15/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_15/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_15/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_15/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_15/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_15/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_15/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_15/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_15/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_15/config/jupyter_server_config.json _ ERROR at setup of test_get_binary_file_contents[AsyncFileContentsManager-foo-b] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4cf6980> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '94c599f3' environ = None http_port = 33567 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4cf6c00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33567 jp_logging_stream = <_io.StringIO object at 0x7f21b4dad840> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_16/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_16/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_16') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4d929e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:58.027 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_16/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_16/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_16/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_16/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_16/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_16/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_16/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_16/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_16/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_16/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_16/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_16/config/jupyter_server_config.json _ ERROR at setup of test_get_binary_file_contents[AsyncFileContentsManager-foo-name with spaces] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4cf7600> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'a37d4b17' environ = None http_port = 34757 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4c84220> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34757 jp_logging_stream = <_io.StringIO object at 0x7f21b4dad240> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_17/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_17/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_17') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4c3c1e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:58.124 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_17/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_17/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_17/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_17/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_17/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_17/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_17/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_17/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_17/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_17/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_17/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_17/config/jupyter_server_config.json _ ERROR at setup of test_get_binary_file_contents[AsyncFileContentsManager-foo-unicod\xe9] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4c859e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'd2c449c3' environ = None http_port = 35055 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4c842c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35055 jp_logging_stream = <_io.StringIO object at 0x7f21b4dae440> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_18/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_18/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_18') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4cc3f20> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:58.218 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_18/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_18/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_18/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_18/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_18/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_18/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_18/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_18/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_18/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_18/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_18/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_18/config/jupyter_server_config.json _ ERROR at setup of test_get_binary_file_contents[AsyncFileContentsManager-foo/bar-baz] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4c85080> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '4106b464' environ = None http_port = 35589 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4c84e00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35589 jp_logging_stream = <_io.StringIO object at 0x7f21b4daea40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_19/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_19/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_19') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b50af3e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:58.519 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_19/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_19/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_19/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_19/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_19/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_19/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_19/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_19/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_19/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_19/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_19/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_19/config/jupyter_server_config.json _ ERROR at setup of test_get_binary_file_contents[AsyncFileContentsManager-ordering-A] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4c87100> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '479ae59c' environ = None http_port = 36961 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4c84f40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36961 jp_logging_stream = <_io.StringIO object at 0x7f21b4c19000> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_20/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_20/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_20') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4cc23f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:58.615 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_20/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_20/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_20/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_20/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_20/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_20/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_20/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_20/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_20/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_20/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_20/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_20/config/jupyter_server_config.json _ ERROR at setup of test_get_binary_file_contents[AsyncFileContentsManager-ordering-b] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4c867a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '52e43bb6' environ = None http_port = 34889 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4c86480> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34889 jp_logging_stream = <_io.StringIO object at 0x7f21b4c18280> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_21/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_21/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_21') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4c28550> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:58.720 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_21/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_21/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_21/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_21/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_21/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_21/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_21/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_21/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_21/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_21/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_21/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_21/config/jupyter_server_config.json _ ERROR at setup of test_get_binary_file_contents[AsyncFileContentsManager-ordering-C] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4c86a20> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '91ecf821' environ = None http_port = 38341 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4c87ba0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38341 jp_logging_stream = <_io.StringIO object at 0x7f21b4c18580> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_22/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_22/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_22') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4c2b520> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:58.815 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_22/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_22/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_22/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_22/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_22/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_22/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_22/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_22/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_22/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_22/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_22/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_22/config/jupyter_server_config.json _ ERROR at setup of test_get_binary_file_contents[AsyncFileContentsManager-\xe5 b-\xe7 d] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4b40680> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '4b9b693f' environ = None http_port = 34729 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4b40860> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34729 jp_logging_stream = <_io.StringIO object at 0x7f21b4c18e80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_23/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_23/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_23') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4c2bf70> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:58.912 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_23/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_23/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_23/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_23/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_23/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_23/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_23/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_23/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_23/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_23/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_23/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_binary_file_contents_23/config/jupyter_server_config.json ___________ ERROR at setup of test_get_bad_type[FileContentsManager] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4b41ee0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '4a89b634' environ = None http_port = 37577 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4b42020> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37577 jp_logging_stream = <_io.StringIO object at 0x7f21b4c181c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_FileContents0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_FileContents0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_FileContents0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4cc98b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:59.008 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_FileContents0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_FileContents0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_FileContents0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_FileContents0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_FileContents0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_FileContents0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_FileContents0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_FileContents0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_FileContents0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_FileContents0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_FileContents0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_FileContents0/config/jupyter_server_config.json ________ ERROR at setup of test_get_bad_type[AsyncFileContentsManager] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4b42ac0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '5d45a348' environ = None http_port = 38921 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4b41260> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38921 jp_logging_stream = <_io.StringIO object at 0x7f21b4c18dc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_AsyncFileCon0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_AsyncFileCon0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_AsyncFileCon0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4c2ab20> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:59.105 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_AsyncFileCon0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_AsyncFileCon0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_AsyncFileCon0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_AsyncFileCon0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_AsyncFileCon0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_AsyncFileCon0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_AsyncFileCon0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_AsyncFileCon0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_AsyncFileCon0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_AsyncFileCon0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_AsyncFileCon0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_bad_type_AsyncFileCon0/config/jupyter_server_config.json _________ ERROR at setup of test_create_untitled[FileContentsManager] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4b436a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '2b7114c8' environ = None http_port = 37627 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4b422a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37627 jp_logging_stream = <_io.StringIO object at 0x7f21b4c193c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_FileConte0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_FileConte0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_FileConte0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4b63250> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:59.214 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_FileConte0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_FileConte0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_FileConte0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_FileConte0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_FileConte0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_FileConte0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_FileConte0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_FileConte0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_FileConte0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_FileConte0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_FileConte0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_FileConte0/config/jupyter_server_config.json _______ ERROR at setup of test_create_untitled[AsyncFileContentsManager] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4b423e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'b4d25fae' environ = None http_port = 45689 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4b409a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45689 jp_logging_stream = <_io.StringIO object at 0x7f21b4c1a680> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_AsyncFile0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_AsyncFile0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_AsyncFile0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4d932a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:59.312 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_AsyncFile0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_AsyncFile0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_AsyncFile0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_AsyncFile0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_AsyncFile0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_AsyncFile0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_AsyncFile0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_AsyncFile0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_AsyncFile0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_AsyncFile0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_AsyncFile0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_AsyncFile0/config/jupyter_server_config.json _______ ERROR at setup of test_create_untitled_txt[FileContentsManager] ________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4b42ca0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'a02509ce' environ = None http_port = 42109 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4bc4040> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42109 jp_logging_stream = <_io.StringIO object at 0x7f21b4c19fc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_FileC0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_FileC0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_FileC0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4b61090> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:59.413 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_FileC0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_FileC0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_FileC0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_FileC0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_FileC0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_FileC0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_FileC0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_FileC0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_FileC0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_FileC0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_FileC0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_FileC0/config/jupyter_server_config.json _____ ERROR at setup of test_create_untitled_txt[AsyncFileContentsManager] _____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4bc5940> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'aae2e4aa' environ = None http_port = 43851 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4bc42c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43851 jp_logging_stream = <_io.StringIO object at 0x7f21b4c1b280> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_Async0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_Async0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_Async0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4cc9400> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:59.509 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_Async0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_Async0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_Async0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_Async0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_Async0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_Async0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_Async0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_Async0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_Async0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_Async0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_Async0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_untitled_txt_Async0/config/jupyter_server_config.json ______________ ERROR at setup of test_upload[FileContentsManager] ______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4bc6520> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '19562457' environ = None http_port = 46847 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4bc5120> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46847 jp_logging_stream = <_io.StringIO object at 0x7f21b4c1b7c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_upload_FileContentsManage0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_upload_FileContentsManage0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_upload_FileContentsManage0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4b619a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:59.606 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_upload_FileContentsManage0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_upload_FileContentsManage0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_upload_FileContentsManage0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_FileContentsManage0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_FileContentsManage0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_FileContentsManage0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_FileContentsManage0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_FileContentsManage0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_FileContentsManage0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_FileContentsManage0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_FileContentsManage0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_FileContentsManage0/config/jupyter_server_config.json ___________ ERROR at setup of test_upload[AsyncFileContentsManager] ____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4bc7060> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '61974679' environ = None http_port = 35561 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4bc49a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35561 jp_logging_stream = <_io.StringIO object at 0x7f21b4b58400> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_upload_AsyncFileContentsM0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_upload_AsyncFileContentsM0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_upload_AsyncFileContentsM0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4b60780> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:59.714 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_upload_AsyncFileContentsM0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_upload_AsyncFileContentsM0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_upload_AsyncFileContentsM0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_AsyncFileContentsM0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_AsyncFileContentsM0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_AsyncFileContentsM0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_AsyncFileContentsM0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_AsyncFileContentsM0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_AsyncFileContentsM0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_AsyncFileContentsM0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_AsyncFileContentsM0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_AsyncFileContentsM0/config/jupyter_server_config.json __________ ERROR at setup of test_mkdir_untitled[FileContentsManager] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4bc7c40> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '219c3ab3' environ = None http_port = 33395 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4bc6840> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33395 jp_logging_stream = <_io.StringIO object at 0x7f21b4b58b80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_FileConten0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_FileConten0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_FileConten0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4bef570> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:59.811 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_FileConten0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_FileConten0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_FileConten0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_FileConten0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_FileConten0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_FileConten0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_FileConten0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_FileConten0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_FileConten0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_FileConten0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_FileConten0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_FileConten0/config/jupyter_server_config.json _______ ERROR at setup of test_mkdir_untitled[AsyncFileContentsManager] ________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4bc7240> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '5b559e2f' environ = None http_port = 42477 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4bc7b00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42477 jp_logging_stream = <_io.StringIO object at 0x7f21b4b584c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_AsyncFileC0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_AsyncFileC0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_AsyncFileC0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4b45360> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:41:59.917 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_AsyncFileC0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_AsyncFileC0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_AsyncFileC0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_AsyncFileC0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_AsyncFileC0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_AsyncFileC0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_AsyncFileC0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_AsyncFileC0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_AsyncFileC0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_AsyncFileC0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_AsyncFileC0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_untitled_AsyncFileC0/config/jupyter_server_config.json ______________ ERROR at setup of test_mkdir[FileContentsManager] _______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4ed8400> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '66249bd7' environ = None http_port = 42859 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4ed85e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42859 jp_logging_stream = <_io.StringIO object at 0x7f21b4b587c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_FileContentsManager0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_FileContentsManager0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_FileContentsManager0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4beddb0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:00.015 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_FileContentsManager0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_FileContentsManager0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_FileContentsManager0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_FileContentsManager0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_FileContentsManager0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_FileContentsManager0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_FileContentsManager0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_FileContentsManager0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_FileContentsManager0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_FileContentsManager0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_FileContentsManager0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_FileContentsManager0/config/jupyter_server_config.json ____________ ERROR at setup of test_mkdir[AsyncFileContentsManager] ____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4ed9ee0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '5a72032a' environ = None http_port = 40241 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4ed8720> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40241 jp_logging_stream = <_io.StringIO object at 0x7f21b4b596c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_AsyncFileContentsMa0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_AsyncFileContentsMa0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_AsyncFileContentsMa0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4e89bd0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:00.113 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_AsyncFileContentsMa0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_AsyncFileContentsMa0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_AsyncFileContentsMa0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_AsyncFileContentsMa0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_AsyncFileContentsMa0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_AsyncFileContentsMa0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_AsyncFileContentsMa0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_AsyncFileContentsMa0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_AsyncFileContentsMa0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_AsyncFileContentsMa0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_AsyncFileContentsMa0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_AsyncFileContentsMa0/config/jupyter_server_config.json _________ ERROR at setup of test_mkdir_hidden_400[FileContentsManager] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4edaac0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'f9c69645' environ = None http_port = 34621 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4ed96c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34621 jp_logging_stream = <_io.StringIO object at 0x7f21b4b59000> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_FileCont0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_FileCont0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_FileCont0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4e8b390> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:00.209 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_FileCont0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_FileCont0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_FileCont0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_FileCont0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_FileCont0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_FileCont0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_FileCont0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_FileCont0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_FileCont0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_FileCont0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_FileCont0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_FileCont0/config/jupyter_server_config.json ______ ERROR at setup of test_mkdir_hidden_400[AsyncFileContentsManager] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4edb6a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '8a49373f' environ = None http_port = 37327 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4eda2a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37327 jp_logging_stream = <_io.StringIO object at 0x7f21b4b5a2c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_AsyncFil0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_AsyncFil0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_AsyncFil0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4e8f250> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:00.305 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_AsyncFil0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_AsyncFil0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_AsyncFil0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_AsyncFil0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_AsyncFil0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_AsyncFil0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_AsyncFil0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_AsyncFil0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_AsyncFil0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_AsyncFil0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_AsyncFil0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_mkdir_hidden_400_AsyncFil0/config/jupyter_server_config.json ____________ ERROR at setup of test_upload_txt[FileContentsManager] ____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4edade0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '2befda46' environ = None http_port = 37689 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4edac00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37689 jp_logging_stream = <_io.StringIO object at 0x7f21b4b59c00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_FileContentsMa0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_FileContentsMa0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_FileContentsMa0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4e8a670> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:00.617 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_FileContentsMa0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_FileContentsMa0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_FileContentsMa0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_FileContentsMa0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_FileContentsMa0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_FileContentsMa0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_FileContentsMa0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_FileContentsMa0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_FileContentsMa0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_FileContentsMa0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_FileContentsMa0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_FileContentsMa0/config/jupyter_server_config.json _________ ERROR at setup of test_upload_txt[AsyncFileContentsManager] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4edb9c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '5de18fb1' environ = None http_port = 35941 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4e74180> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35941 jp_logging_stream = <_io.StringIO object at 0x7f21b4b5aec0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_AsyncFileConte0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_AsyncFileConte0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_AsyncFileConte0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4e8dbd0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:00.713 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_AsyncFileConte0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_AsyncFileConte0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_AsyncFileConte0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_AsyncFileConte0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_AsyncFileConte0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_AsyncFileConte0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_AsyncFileConte0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_AsyncFileConte0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_AsyncFileConte0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_AsyncFileConte0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_AsyncFileConte0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_AsyncFileConte0/config/jupyter_server_config.json ________ ERROR at setup of test_upload_txt_hidden[FileContentsManager] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4e75940> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '2362e92a' environ = None http_port = 44031 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4e74ae0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44031 jp_logging_stream = <_io.StringIO object at 0x7f21b4b5a800> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_FileCon0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_FileCon0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_FileCon0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4e7ff70> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:00.820 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_FileCon0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_FileCon0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_FileCon0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_FileCon0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_FileCon0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_FileCon0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_FileCon0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_FileCon0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_FileCon0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_FileCon0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_FileCon0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_FileCon0/config/jupyter_server_config.json ______ ERROR at setup of test_upload_txt_hidden[AsyncFileContentsManager] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4e76480> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'e62d8fbd' environ = None http_port = 34919 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4e74540> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34919 jp_logging_stream = <_io.StringIO object at 0x7f21b4ec4e80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_AsyncFi0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_AsyncFi0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_AsyncFi0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4e8c9b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:00.917 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_AsyncFi0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_AsyncFi0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_AsyncFi0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_AsyncFi0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_AsyncFi0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_AsyncFi0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_AsyncFi0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_AsyncFi0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_AsyncFi0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_AsyncFi0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_AsyncFi0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_txt_hidden_AsyncFi0/config/jupyter_server_config.json ____________ ERROR at setup of test_upload_b64[FileContentsManager] ____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4e76b60> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '85e629b4' environ = None http_port = 39555 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4e75b20> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39555 jp_logging_stream = <_io.StringIO object at 0x7f21b4ec4400> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_FileContentsMa0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_FileContentsMa0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_FileContentsMa0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4e7c050> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:01.018 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_FileContentsMa0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_FileContentsMa0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_FileContentsMa0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_FileContentsMa0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_FileContentsMa0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_FileContentsMa0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_FileContentsMa0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_FileContentsMa0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_FileContentsMa0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_FileContentsMa0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_FileContentsMa0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_FileContentsMa0/config/jupyter_server_config.json _________ ERROR at setup of test_upload_b64[AsyncFileContentsManager] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4e77ba0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '88459af5' environ = None http_port = 39871 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4e75a80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39871 jp_logging_stream = <_io.StringIO object at 0x7f21b4ec4040> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_AsyncFileConte0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_AsyncFileConte0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_AsyncFileConte0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4ad3110> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:01.114 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_AsyncFileConte0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_AsyncFileConte0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_AsyncFileConte0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_AsyncFileConte0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_AsyncFileConte0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_AsyncFileConte0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_AsyncFileConte0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_AsyncFileConte0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_AsyncFileConte0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_AsyncFileConte0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_AsyncFileConte0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_upload_b64_AsyncFileConte0/config/jupyter_server_config.json _______________ ERROR at setup of test_copy[FileContentsManager] _______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4e75ee0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'cd53f697' environ = None http_port = 38921 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4e77420> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38921 jp_logging_stream = <_io.StringIO object at 0x7f21b4ec4d00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_copy_FileContentsManager_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_FileContentsManager_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_FileContentsManager_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4e7f070> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:01.210 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_copy_FileContentsManager_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_FileContentsManager_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_FileContentsManager_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_FileContentsManager_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_FileContentsManager_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_FileContentsManager_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_FileContentsManager_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_FileContentsManager_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_FileContentsManager_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_FileContentsManager_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_FileContentsManager_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_FileContentsManager_0/config/jupyter_server_config.json ____________ ERROR at setup of test_copy[AsyncFileContentsManager] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4ae4540> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'd38a2d86' environ = None http_port = 41261 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4ae4720> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41261 jp_logging_stream = <_io.StringIO object at 0x7f21b4ec5300> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_copy_AsyncFileContentsMan0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_AsyncFileContentsMan0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_AsyncFileContentsMan0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4ad16d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:01.316 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_copy_AsyncFileContentsMan0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_AsyncFileContentsMan0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_AsyncFileContentsMan0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_AsyncFileContentsMan0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_AsyncFileContentsMan0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_AsyncFileContentsMan0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_AsyncFileContentsMan0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_AsyncFileContentsMan0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_AsyncFileContentsMan0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_AsyncFileContentsMan0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_AsyncFileContentsMan0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_AsyncFileContentsMan0/config/jupyter_server_config.json _____________ ERROR at setup of test_copy_dir[FileContentsManager] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4ae5ee0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'dca3c425' environ = None http_port = 40863 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4ae5080> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40863 jp_logging_stream = <_io.StringIO object at 0x7f21b4ec4c40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_FileContentsMana0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_FileContentsMana0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_FileContentsMana0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4ac5770> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:01.412 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_FileContentsMana0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_FileContentsMana0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_FileContentsMana0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_FileContentsMana0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_FileContentsMana0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_FileContentsMana0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_FileContentsMana0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_FileContentsMana0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_FileContentsMana0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_FileContentsMana0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_FileContentsMana0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_FileContentsMana0/config/jupyter_server_config.json __________ ERROR at setup of test_copy_dir[AsyncFileContentsManager] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4ae6ac0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'ea2e6aa2' environ = None http_port = 45211 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4ae56c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45211 jp_logging_stream = <_io.StringIO object at 0x7f21b4ec5f00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_AsyncFileContent0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_AsyncFileContent0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_AsyncFileContent0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4ad17c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:01.513 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_AsyncFileContent0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_AsyncFileContent0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_AsyncFileContent0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_AsyncFileContent0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_AsyncFileContent0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_AsyncFileContent0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_AsyncFileContent0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_AsyncFileContent0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_AsyncFileContent0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_AsyncFileContent0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_AsyncFileContent0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_AsyncFileContent0/config/jupyter_server_config.json ____________ ERROR at setup of test_copy_path[FileContentsManager] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4ae7600> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '92c2edf9' environ = None http_port = 35705 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4ae6200> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35705 jp_logging_stream = <_io.StringIO object at 0x7f21b4ec5840> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_copy_path_FileContentsMan0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_path_FileContentsMan0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_path_FileContentsMan0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4aaf8e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:01.610 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_copy_path_FileContentsMan0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_path_FileContentsMan0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_path_FileContentsMan0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_path_FileContentsMan0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_path_FileContentsMan0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_path_FileContentsMan0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_path_FileContentsMan0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_path_FileContentsMan0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_path_FileContentsMan0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_path_FileContentsMan0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_path_FileContentsMan0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_path_FileContentsMan0/config/jupyter_server_config.json __________ ERROR at setup of test_copy_path[AsyncFileContentsManager] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4ae54e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '504b31cf' environ = None http_port = 45609 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4ae6980> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45609 jp_logging_stream = <_io.StringIO object at 0x7f21b4ec6b00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_copy_path_AsyncFileConten0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_path_AsyncFileConten0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_path_AsyncFileConten0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4ac5c70> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:01.707 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_copy_path_AsyncFileConten0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_path_AsyncFileConten0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_path_AsyncFileConten0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_path_AsyncFileConten0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_path_AsyncFileConten0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_path_AsyncFileConten0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_path_AsyncFileConten0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_path_AsyncFileConten0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_path_AsyncFileConten0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_path_AsyncFileConten0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_path_AsyncFileConten0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_path_AsyncFileConten0/config/jupyter_server_config.json ___________ ERROR at setup of test_copy_put_400[FileContentsManager] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4ae6020> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'faaf564a' environ = None http_port = 38425 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4ae7ba0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38425 jp_logging_stream = <_io.StringIO object at 0x7f21b4ec6440> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_FileContents0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_FileContents0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_FileContents0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4aac640> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:01.814 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_FileContents0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_FileContents0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_FileContents0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_FileContents0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_FileContents0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_FileContents0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_FileContents0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_FileContents0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_FileContents0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_FileContents0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_FileContents0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_FileContents0/config/jupyter_server_config.json ________ ERROR at setup of test_copy_put_400[AsyncFileContentsManager] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b49cd8a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '662cb7dc' environ = None http_port = 37727 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b49cc220> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37727 jp_logging_stream = <_io.StringIO object at 0x7f21b4ec7700> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_AsyncFileCon0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_AsyncFileCon0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_AsyncFileCon0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4c2bd40> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:01.909 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_AsyncFileCon0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_AsyncFileCon0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_AsyncFileCon0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_AsyncFileCon0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_AsyncFileCon0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_AsyncFileCon0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_AsyncFileCon0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_AsyncFileCon0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_AsyncFileCon0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_AsyncFileCon0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_AsyncFileCon0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_AsyncFileCon0/config/jupyter_server_config.json _______ ERROR at setup of test_copy_put_400_hidden[FileContentsManager] ________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b49cdf80> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '22d23d90' environ = None http_port = 46659 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b49ccf40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46659 jp_logging_stream = <_io.StringIO object at 0x7f21b4a250c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_FileC0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_FileC0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_FileC0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4afa210> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:02.015 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_FileC0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_FileC0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_FileC0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_FileC0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_FileC0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_FileC0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_FileC0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_FileC0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_FileC0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_FileC0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_FileC0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_FileC0/config/jupyter_server_config.json _____ ERROR at setup of test_copy_put_400_hidden[AsyncFileContentsManager] _____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b49cefc0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '58b22294' environ = None http_port = 44601 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b49ccea0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44601 jp_logging_stream = <_io.StringIO object at 0x7f21b4a24340> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_Async0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_Async0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_Async0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4afa2b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:02.112 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_Async0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_Async0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_Async0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_Async0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_Async0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_Async0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_Async0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_Async0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_Async0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_Async0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_Async0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_put_400_hidden_Async0/config/jupyter_server_config.json _________ ERROR at setup of test_copy_400_hidden[FileContentsManager] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b49cfba0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'aea423c5' environ = None http_port = 40237 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b49ce7a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40237 jp_logging_stream = <_io.StringIO object at 0x7f21b4a24640> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_FileConte0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_FileConte0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_FileConte0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b49a2e90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:02.210 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_FileConte0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_FileConte0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_FileConte0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_FileConte0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_FileConte0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_FileConte0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_FileConte0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_FileConte0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_FileConte0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_FileConte0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_FileConte0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_FileConte0/config/jupyter_server_config.json _______ ERROR at setup of test_copy_400_hidden[AsyncFileContentsManager] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b49cf1a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '4c3dc78e' environ = None http_port = 35925 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b49cfa60> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35925 jp_logging_stream = <_io.StringIO object at 0x7f21b4a24ac0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_AsyncFile0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_AsyncFile0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_AsyncFile0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4afa670> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:02.307 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_AsyncFile0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_AsyncFile0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_AsyncFile0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_AsyncFile0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_AsyncFile0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_AsyncFile0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_AsyncFile0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_AsyncFile0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_AsyncFile0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_AsyncFile0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_AsyncFile0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_copy_400_hidden_AsyncFile0/config/jupyter_server_config.json __________ ERROR at setup of test_delete[FileContentsManager--inroot] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b49ed080> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '9ab955af' environ = None http_port = 44841 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b49ed300> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44841 jp_logging_stream = <_io.StringIO object at 0x7f21b4a24280> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b49a07d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:02.406 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage0/config/jupyter_server_config.json _ ERROR at setup of test_delete[FileContentsManager-Directory with spaces in-inspace] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b49edee0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '72123817' environ = None http_port = 45581 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b49ecae0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45581 jp_logging_stream = <_io.StringIO object at 0x7f21b4a25b40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b493f610> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:02.729 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage1/config/jupyter_server_config.json ___ ERROR at setup of test_delete[FileContentsManager-unicod\xe9-innonascii] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b49eeb60> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '50b01717' environ = None http_port = 34991 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b49ec860> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34991 jp_logging_stream = <_io.StringIO object at 0x7f21b4a25480> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4e7fe80> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:02.825 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage2/config/jupyter_server_config.json ___________ ERROR at setup of test_delete[FileContentsManager-foo-a] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b49ef920> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '3e39fc16' environ = None http_port = 36853 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b49ee520> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36853 jp_logging_stream = <_io.StringIO object at 0x7f21b4a26740> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b493f3e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:02.928 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage3/config/jupyter_server_config.json ___________ ERROR at setup of test_delete[FileContentsManager-foo-b] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b49ee160> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '403ea1d6' environ = None http_port = 41563 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b49ef2e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41563 jp_logging_stream = <_io.StringIO object at 0x7f21b4a26d40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b49e6cb0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:03.024 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage4/config/jupyter_server_config.json ___ ERROR at setup of test_delete[FileContentsManager-foo-name with spaces] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b481c400> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'e8e3ef10' environ = None http_port = 41571 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b481c5e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41571 jp_logging_stream = <_io.StringIO object at 0x7f21b4a27340> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b493c550> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:03.120 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage5/config/jupyter_server_config.json ______ ERROR at setup of test_delete[FileContentsManager-foo-unicod\xe9] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b481da80> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '0743d80e' environ = None http_port = 42773 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b481cfe0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42773 jp_logging_stream = <_io.StringIO object at 0x7f21b496c880> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage6/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage6/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage6') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b49e7250> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:03.216 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage6/config/jupyter_server_config.json ________ ERROR at setup of test_delete[FileContentsManager-foo/bar-baz] ________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b481ec00> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '156c41cf' environ = None http_port = 44199 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b481d800> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44199 jp_logging_stream = <_io.StringIO object at 0x7f21b496c4c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage7/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage7/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b488f7f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:03.311 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage7/config/jupyter_server_config.json ________ ERROR at setup of test_delete[FileContentsManager-ordering-A] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b481f880> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'bfa07a24' environ = None http_port = 45499 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b481e480> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45499 jp_logging_stream = <_io.StringIO object at 0x7f21b496cc40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage8/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage8/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage8') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b488e8f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:03.418 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage8/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage8/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage8/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage8/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage8/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage8/config/jupyter_server_config.json ________ ERROR at setup of test_delete[FileContentsManager-ordering-b] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b481e520> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'd076faf1' environ = None http_port = 45629 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b481f1a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45629 jp_logging_stream = <_io.StringIO object at 0x7f21b496c580> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage9/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage9/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage9') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b488ed50> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:03.513 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage9/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage9/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage9/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage9/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage9/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage9/config/jupyter_server_config.json ________ ERROR at setup of test_delete[FileContentsManager-ordering-C] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b48582c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '59a1d5c9' environ = None http_port = 45759 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b48584a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45759 jp_logging_stream = <_io.StringIO object at 0x7f21b496d180> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage10/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage10/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage10') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b48676b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:03.615 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage10/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage10/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage10/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage10/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage10/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage10/config/jupyter_server_config.json _______ ERROR at setup of test_delete[FileContentsManager-\xe5 b-\xe7 d] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b48599e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '0437b939' environ = None http_port = 40447 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4858f40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40447 jp_logging_stream = <_io.StringIO object at 0x7f21b496d780> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage11/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage11/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage11') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b488ee40> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:03.711 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage11/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage11/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage11/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage11/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage11/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_FileContentsManage11/config/jupyter_server_config.json _______ ERROR at setup of test_delete[AsyncFileContentsManager--inroot] ________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b485ab60> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '4b195672' environ = None http_port = 45701 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4858c20> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45701 jp_logging_stream = <_io.StringIO object at 0x7f21b496dd80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4865270> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:03.807 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM0/config/jupyter_server_config.json _ ERROR at setup of test_delete[AsyncFileContentsManager-Directory with spaces in-inspace] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b485a340> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '71e13341' environ = None http_port = 39319 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b485a160> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39319 jp_logging_stream = <_io.StringIO object at 0x7f21b496e380> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b489c0f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:03.913 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM1/config/jupyter_server_config.json _ ERROR at setup of test_delete[AsyncFileContentsManager-unicod\xe9-innonascii] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b485aca0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '5c28b063' environ = None http_port = 40665 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b485a520> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40665 jp_logging_stream = <_io.StringIO object at 0x7f21b496e980> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b489ef80> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:04.008 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM2/config/jupyter_server_config.json ________ ERROR at setup of test_delete[AsyncFileContentsManager-foo-a] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b485b9c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '786c79d0' environ = None http_port = 33637 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b45f0040> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33637 jp_logging_stream = <_io.StringIO object at 0x7f21b496e2c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4872df0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:04.112 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM3/config/jupyter_server_config.json ________ ERROR at setup of test_delete[AsyncFileContentsManager-foo-b] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b45f1800> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '9e71cf6a' environ = None http_port = 35811 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b45f09a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35811 jp_logging_stream = <_io.StringIO object at 0x7f21b496e8c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b489d7c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:04.208 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM4/config/jupyter_server_config.json _ ERROR at setup of test_delete[AsyncFileContentsManager-foo-name with spaces] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b45f0d60> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '8293a5ac' environ = None http_port = 34945 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b45f0b80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34945 jp_logging_stream = <_io.StringIO object at 0x7f21b451cf40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b48730c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:04.305 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM5/config/jupyter_server_config.json ____ ERROR at setup of test_delete[AsyncFileContentsManager-foo-unicod\xe9] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b45f18a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'a0a9adba' environ = None http_port = 43935 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b45f1120> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43935 jp_logging_stream = <_io.StringIO object at 0x7f21b451c1c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM6/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM6/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM6') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4503de0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:04.399 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM6/config/jupyter_server_config.json _____ ERROR at setup of test_delete[AsyncFileContentsManager-foo/bar-baz] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b45f3880> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '1870e8b0' environ = None http_port = 38259 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b45f11c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38259 jp_logging_stream = <_io.StringIO object at 0x7f21b451c4c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM7/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM7/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4870050> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:04.492 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM7/config/jupyter_server_config.json ______ ERROR at setup of test_delete[AsyncFileContentsManager-ordering-A] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b45f1c60> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '97c51ea2' environ = None http_port = 46753 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b45f2ca0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46753 jp_logging_stream = <_io.StringIO object at 0x7f21b451cdc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM8/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM8/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM8') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b45010e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:04.805 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM8/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM8/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM8/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM8/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM8/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM8/config/jupyter_server_config.json ______ ERROR at setup of test_delete[AsyncFileContentsManager-ordering-b] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b45f31a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'fb1dca23' environ = None http_port = 46809 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b45b0180> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46809 jp_logging_stream = <_io.StringIO object at 0x7f21b451c100> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM9/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM9/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM9') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b45e7fc0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:04.901 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM9/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM9/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM9/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM9/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM9/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM9/config/jupyter_server_config.json ______ ERROR at setup of test_delete[AsyncFileContentsManager-ordering-C] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b45b18a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'c09accdb' environ = None http_port = 36339 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b45b0220> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36339 jp_logging_stream = <_io.StringIO object at 0x7f21b451cd00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM10/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM10/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM10') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4502670> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:05.003 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM10/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM10/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM10/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM10/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM10/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM10/config/jupyter_server_config.json ____ ERROR at setup of test_delete[AsyncFileContentsManager-\xe5 b-\xe7 d] _____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b45b23e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'c2e8cfb8' environ = None http_port = 34497 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b45b07c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34497 jp_logging_stream = <_io.StringIO object at 0x7f21b451d300> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM11/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM11/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM11') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b45cf2a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:05.100 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM11/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM11/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM11/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM11/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM11/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_AsyncFileContentsM11/config/jupyter_server_config.json ___________ ERROR at setup of test_delete_dirs[FileContentsManager] ____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b45b2fc0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '29a6cdbb' environ = None http_port = 42407 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b45b1bc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42407 jp_logging_stream = <_io.StringIO object at 0x7f21b451d900> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_FileContentsM0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_FileContentsM0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_FileContentsM0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b45cc370> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:05.198 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_FileContentsM0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_FileContentsM0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_FileContentsM0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_FileContentsM0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_FileContentsM0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_FileContentsM0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_FileContentsM0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_FileContentsM0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_FileContentsM0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_FileContentsM0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_FileContentsM0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_FileContentsM0/config/jupyter_server_config.json _________ ERROR at setup of test_delete_dirs[AsyncFileContentsManager] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b45b3b00> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'bd3fa5c5' environ = None http_port = 35135 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b45b1800> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35135 jp_logging_stream = <_io.StringIO object at 0x7f21b451df00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_AsyncFileCont0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_AsyncFileCont0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_AsyncFileCont0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b45cead0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:05.295 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_AsyncFileCont0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_AsyncFileCont0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_AsyncFileCont0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_AsyncFileCont0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_AsyncFileCont0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_AsyncFileCont0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_AsyncFileCont0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_AsyncFileCont0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_AsyncFileCont0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_AsyncFileCont0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_AsyncFileCont0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_dirs_AsyncFileCont0/config/jupyter_server_config.json _______ ERROR at setup of test_delete_non_empty_dir[FileContentsManager] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b45b2340> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '5514579a' environ = None http_port = 39049 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b45b3380> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39049 jp_logging_stream = <_io.StringIO object at 0x7f21b451e500> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_File0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_File0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_File0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b46fbd40> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:05.391 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_File0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_File0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_File0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_File0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_File0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_File0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_File0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_File0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_File0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_File0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_File0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_File0/config/jupyter_server_config.json ____ ERROR at setup of test_delete_non_empty_dir[AsyncFileContentsManager] _____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b46704a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'e7650799' environ = None http_port = 33779 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4670680> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33779 jp_logging_stream = <_io.StringIO object at 0x7f21b451f7c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_Asyn0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_Asyn0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_Asyn0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b45cf9d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:05.498 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_Asyn0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_Asyn0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_Asyn0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_Asyn0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_Asyn0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_Asyn0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_Asyn0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_Asyn0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_Asyn0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_Asyn0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_Asyn0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_dir_Asyn0/config/jupyter_server_config.json ________ ERROR at setup of test_delete_hidden_dir[FileContentsManager] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4671e40> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'fe3840f2' environ = None http_port = 40957 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4670fe0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40957 jp_logging_stream = <_io.StringIO object at 0x7f21b4695180> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_FileCon0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_FileCon0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_FileCon0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b46fa300> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:05.595 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_FileCon0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_FileCon0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_FileCon0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_FileCon0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_FileCon0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_FileCon0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_FileCon0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_FileCon0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_FileCon0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_FileCon0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_FileCon0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_FileCon0/config/jupyter_server_config.json ______ ERROR at setup of test_delete_hidden_dir[AsyncFileContentsManager] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4672980> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'b6a65475' environ = None http_port = 36989 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4670cc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36989 jp_logging_stream = <_io.StringIO object at 0x7f21b4694400> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_AsyncFi0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_AsyncFi0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_AsyncFi0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4873480> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:05.695 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_AsyncFi0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_AsyncFi0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_AsyncFi0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_AsyncFi0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_AsyncFi0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_AsyncFi0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_AsyncFi0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_AsyncFi0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_AsyncFi0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_AsyncFi0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_AsyncFi0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_dir_AsyncFi0/config/jupyter_server_config.json ________ ERROR at setup of test_delete_hidden_file[FileContentsManager] ________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4673560> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '9ba63c64' environ = None http_port = 37903 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4672160> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37903 jp_logging_stream = <_io.StringIO object at 0x7f21b4694700> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_FileCo0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_FileCo0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_FileCo0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b468ba70> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:05.790 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_FileCo0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_FileCo0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_FileCo0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_FileCo0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_FileCo0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_FileCo0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_FileCo0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_FileCo0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_FileCo0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_FileCo0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_FileCo0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_FileCo0/config/jupyter_server_config.json _____ ERROR at setup of test_delete_hidden_file[AsyncFileContentsManager] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4672d40> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '4531f996' environ = None http_port = 44077 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b46723e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44077 jp_logging_stream = <_io.StringIO object at 0x7f21b4694b80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_AsyncF0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_AsyncF0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_AsyncF0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4689130> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:05.885 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_AsyncF0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_AsyncF0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_AsyncF0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_AsyncF0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_AsyncF0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_AsyncF0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_AsyncF0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_AsyncF0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_AsyncF0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_AsyncF0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_AsyncF0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_hidden_file_AsyncF0/config/jupyter_server_config.json ______________ ERROR at setup of test_rename[FileContentsManager] ______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4670900> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '6c01864f' environ = None http_port = 44297 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4673a60> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44297 jp_logging_stream = <_io.StringIO object at 0x7f21b4694340> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_rename_FileContentsManage0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_rename_FileContentsManage0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_rename_FileContentsManage0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b46a3390> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:05.989 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_rename_FileContentsManage0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_rename_FileContentsManage0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_rename_FileContentsManage0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_FileContentsManage0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_FileContentsManage0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_FileContentsManage0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_FileContentsManage0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_FileContentsManage0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_FileContentsManage0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_rename_FileContentsManage0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_rename_FileContentsManage0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_rename_FileContentsManage0/config/jupyter_server_config.json ___________ ERROR at setup of test_rename[AsyncFileContentsManager] ____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b46758a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '9924e15a' environ = None http_port = 42807 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4674a40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42807 jp_logging_stream = <_io.StringIO object at 0x7f21b4695c00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_rename_AsyncFileContentsM0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_rename_AsyncFileContentsM0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_rename_AsyncFileContentsM0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4688b90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:06.082 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_rename_AsyncFileContentsM0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_rename_AsyncFileContentsM0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_rename_AsyncFileContentsM0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_AsyncFileContentsM0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_AsyncFileContentsM0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_AsyncFileContentsM0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_AsyncFileContentsM0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_AsyncFileContentsM0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_AsyncFileContentsM0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_rename_AsyncFileContentsM0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_rename_AsyncFileContentsM0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_rename_AsyncFileContentsM0/config/jupyter_server_config.json ________ ERROR at setup of test_rename_400_hidden[FileContentsManager] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b46763e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'b6dabbf3' environ = None http_port = 46879 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4674fe0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46879 jp_logging_stream = <_io.StringIO object at 0x7f21b4695540> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_FileCon0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_FileCon0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_FileCon0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b46a0cd0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:06.186 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_FileCon0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_FileCon0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_FileCon0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_FileCon0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_FileCon0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_FileCon0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_FileCon0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_FileCon0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_FileCon0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_FileCon0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_FileCon0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_FileCon0/config/jupyter_server_config.json ______ ERROR at setup of test_rename_400_hidden[AsyncFileContentsManager] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4676f20> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '0693ad05' environ = None http_port = 40175 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4674860> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40175 jp_logging_stream = <_io.StringIO object at 0x7f21b4696800> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_AsyncFi0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_AsyncFi0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_AsyncFi0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b46f4230> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:06.283 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_AsyncFi0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_AsyncFi0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_AsyncFi0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_AsyncFi0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_AsyncFi0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_AsyncFi0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_AsyncFi0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_AsyncFi0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_AsyncFi0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_AsyncFi0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_AsyncFi0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_rename_400_hidden_AsyncFi0/config/jupyter_server_config.json _____ ERROR at setup of test_checkpoints_follow_file[FileContentsManager] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4677b00> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'ce34bdbb' environ = None http_port = 34121 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4676700> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34121 jp_logging_stream = <_io.StringIO object at 0x7f21b4696140> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_F0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_F0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_F0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b46a0ff0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:06.381 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_F0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_F0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_F0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_F0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_F0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_F0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_F0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_F0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_F0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_F0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_F0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_F0/config/jupyter_server_config.json ___ ERROR at setup of test_checkpoints_follow_file[AsyncFileContentsManager] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4677380> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '49d5c13a' environ = None http_port = 43549 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b46774c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43549 jp_logging_stream = <_io.StringIO object at 0x7f21b4697400> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_A0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_A0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_A0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b44db700> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:06.477 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_A0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_A0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_A0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_A0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_A0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_A0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_A0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_A0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_A0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_A0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_A0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_A0/config/jupyter_server_config.json _________ ERROR at setup of test_rename_existing[FileContentsManager] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4428360> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'ca5346a7' environ = None http_port = 38421 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4428540> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38421 jp_logging_stream = <_io.StringIO object at 0x7f21b44e0dc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_FileConte0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_FileConte0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_FileConte0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b46f68f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:06.575 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_FileConte0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_FileConte0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_FileConte0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_FileConte0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_FileConte0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_FileConte0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_FileConte0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_FileConte0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_FileConte0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_FileConte0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_FileConte0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_FileConte0/config/jupyter_server_config.json _______ ERROR at setup of test_rename_existing[AsyncFileContentsManager] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4429e40> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '227acba9' environ = None http_port = 34949 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4428680> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34949 jp_logging_stream = <_io.StringIO object at 0x7f21b44e0100> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_AsyncFile0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_AsyncFile0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_AsyncFile0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b44d99a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:06.912 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_AsyncFile0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_AsyncFile0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_AsyncFile0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_AsyncFile0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_AsyncFile0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_AsyncFile0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_AsyncFile0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_AsyncFile0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_AsyncFile0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_AsyncFile0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_AsyncFile0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_rename_existing_AsyncFile0/config/jupyter_server_config.json _______________ ERROR at setup of test_save[FileContentsManager] _______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b442aa20> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'faa09a4a' environ = None http_port = 35793 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4429620> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35793 jp_logging_stream = <_io.StringIO object at 0x7f21b44e0700> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_save_FileContentsManager_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_save_FileContentsManager_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_save_FileContentsManager_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b44d7020> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:07.010 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_save_FileContentsManager_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_save_FileContentsManager_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_save_FileContentsManager_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_FileContentsManager_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_FileContentsManager_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_FileContentsManager_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_FileContentsManager_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_FileContentsManager_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_FileContentsManager_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_save_FileContentsManager_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_save_FileContentsManager_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_save_FileContentsManager_0/config/jupyter_server_config.json ____________ ERROR at setup of test_save[AsyncFileContentsManager] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b442b600> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '592828ef' environ = None http_port = 38669 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b442a200> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38669 jp_logging_stream = <_io.StringIO object at 0x7f21b44e07c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_save_AsyncFileContentsMan0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_save_AsyncFileContentsMan0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_save_AsyncFileContentsMan0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b44db340> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:07.119 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_save_AsyncFileContentsMan0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_save_AsyncFileContentsMan0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_save_AsyncFileContentsMan0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_AsyncFileContentsMan0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_AsyncFileContentsMan0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_AsyncFileContentsMan0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_AsyncFileContentsMan0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_AsyncFileContentsMan0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_AsyncFileContentsMan0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_save_AsyncFileContentsMan0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_save_AsyncFileContentsMan0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_save_AsyncFileContentsMan0/config/jupyter_server_config.json ___________ ERROR at setup of test_checkpoints[FileContentsManager] ____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b442ac00> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '8ead4bc9' environ = None http_port = 45777 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b442a3e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45777 jp_logging_stream = <_io.StringIO object at 0x7f21b44e0040> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_FileContentsM0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_FileContentsM0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_FileContentsM0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b44da800> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:07.216 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_FileContentsM0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_FileContentsM0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_FileContentsM0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_FileContentsM0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_FileContentsM0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_FileContentsM0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_FileContentsM0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_FileContentsM0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_FileContentsM0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_FileContentsM0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_FileContentsM0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_FileContentsM0/config/jupyter_server_config.json _________ ERROR at setup of test_checkpoints[AsyncFileContentsManager] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b442b880> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '64989300' environ = None http_port = 40793 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b448c0e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40793 jp_logging_stream = <_io.StringIO object at 0x7f21b44e1840> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_AsyncFileCont0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_AsyncFileCont0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_AsyncFileCont0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b444f2f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:07.315 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_AsyncFileCont0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_AsyncFileCont0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_AsyncFileCont0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_AsyncFileCont0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_AsyncFileCont0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_AsyncFileCont0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_AsyncFileCont0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_AsyncFileCont0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_AsyncFileCont0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_AsyncFileCont0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_AsyncFileCont0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_AsyncFileCont0/config/jupyter_server_config.json _________ ERROR at setup of test_file_checkpoints[FileContentsManager] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b448d8a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '04bdd6c9' environ = None http_port = 46099 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b448ca40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46099 jp_logging_stream = <_io.StringIO object at 0x7f21b44e1180> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_FileCont0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_FileCont0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_FileCont0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b44d4460> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:07.412 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_FileCont0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_FileCont0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_FileCont0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_FileCont0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_FileCont0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_FileCont0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_FileCont0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_FileCont0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_FileCont0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_FileCont0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_FileCont0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_FileCont0/config/jupyter_server_config.json ______ ERROR at setup of test_file_checkpoints[AsyncFileContentsManager] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b448e3e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'ce9894ef' environ = None http_port = 38559 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b448c4a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38559 jp_logging_stream = <_io.StringIO object at 0x7f21b44e2440> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_AsyncFil0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_AsyncFil0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_AsyncFil0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b444e3f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:07.510 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_AsyncFil0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_AsyncFil0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_AsyncFil0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_AsyncFil0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_AsyncFil0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_AsyncFil0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_AsyncFil0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_AsyncFil0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_AsyncFil0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_AsyncFil0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_AsyncFil0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_AsyncFil0/config/jupyter_server_config.json ______________ ERROR at setup of test_trust[FileContentsManager] _______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b448eac0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '92d1cd1f' environ = None http_port = 38405 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b448da80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38405 jp_logging_stream = <_io.StringIO object at 0x7f21b44e1d80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_trust_FileContentsManager0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_trust_FileContentsManager0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_trust_FileContentsManager0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b44d9950> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:07.618 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_trust_FileContentsManager0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_trust_FileContentsManager0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_trust_FileContentsManager0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_trust_FileContentsManager0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_trust_FileContentsManager0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_trust_FileContentsManager0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_trust_FileContentsManager0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_trust_FileContentsManager0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_trust_FileContentsManager0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_trust_FileContentsManager0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_trust_FileContentsManager0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_trust_FileContentsManager0/config/jupyter_server_config.json ____________ ERROR at setup of test_trust[AsyncFileContentsManager] ____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b448fb00> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'd266f0f1' environ = None http_port = 40005 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b448d9e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40005 jp_logging_stream = <_io.StringIO object at 0x7f21b44e3040> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_trust_AsyncFileContentsMa0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_trust_AsyncFileContentsMa0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_trust_AsyncFileContentsMa0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4256620> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:07.716 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_trust_AsyncFileContentsMa0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_trust_AsyncFileContentsMa0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_trust_AsyncFileContentsMa0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_trust_AsyncFileContentsMa0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_trust_AsyncFileContentsMa0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_trust_AsyncFileContentsMa0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_trust_AsyncFileContentsMa0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_trust_AsyncFileContentsMa0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_trust_AsyncFileContentsMa0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_trust_AsyncFileContentsMa0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_trust_AsyncFileContentsMa0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_trust_AsyncFileContentsMa0/config/jupyter_server_config.json _______ ERROR at setup of test_regression_is_hidden[FileContentsManager] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b448de40> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '0f817c49' environ = None http_port = 45859 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b448f380> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45859 jp_logging_stream = <_io.StringIO object at 0x7f21b44e2980> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_File0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_File0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_File0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.FileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b425f1b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:07.818 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_File0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_File0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_File0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_File0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_File0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_File0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_File0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_File0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_File0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.FileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_File0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_File0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_File0/config/jupyter_server_config.json ____ ERROR at setup of test_regression_is_hidden[AsyncFileContentsManager] _____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b42484a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'd4364c70' environ = None http_port = 35331 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4248680> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35331 jp_logging_stream = <_io.StringIO object at 0x7f21b422d000> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_Asyn0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_Asyn0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_Asyn0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.filemanager.AsyncFileContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4256bc0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:07.913 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_Asyn0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_Asyn0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_Asyn0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_Asyn0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_Asyn0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_Asyn0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_Asyn0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_Asyn0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_Asyn0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': 'jupyter_server.services.contents.filemanager.AsyncFileContentsManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_Asyn0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_Asyn0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_Asyn0/config/jupyter_server_config.json ______ ERROR at setup of test_checkpoints_follow_file[contents_manager0] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4249e40> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'dea919c0' environ = None http_port = 38195 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4248fe0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38195 jp_logging_stream = <_io.StringIO object at 0x7f21b422d780> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b425cc80> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:08.010 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c0/config/jupyter_server_config.json ______ ERROR at setup of test_checkpoints_follow_file[contents_manager1] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b424a840> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '40e7834f' environ = None http_port = 45769 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4249440> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45769 jp_logging_stream = <_io.StringIO object at 0x7f21b422d600> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b429ff20> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:08.116 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c1/config/jupyter_server_config.json ______ ERROR at setup of test_checkpoints_follow_file[contents_manager2] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b424b240> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '6032fdf3' environ = None http_port = 42655 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4249580> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42655 jp_logging_stream = <_io.StringIO object at 0x7f21b422c1c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b425c910> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:08.211 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c2/config/jupyter_server_config.json ______ ERROR at setup of test_checkpoints_follow_file[contents_manager3] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b424bce0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '327af542' environ = None http_port = 38481 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b424a020> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38481 jp_logging_stream = <_io.StringIO object at 0x7f21b422cdc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b429f7f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:08.315 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_checkpoints_follow_file_c3/config/jupyter_server_config.json ___________ ERROR at setup of test_nb_checkpoints[contents_manager0] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b424a700> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'b19e0a4e' environ = None http_port = 44443 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b424b4c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44443 jp_logging_stream = <_io.StringIO object at 0x7f21b422d3c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b429b340> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:08.412 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m0/config/jupyter_server_config.json ___________ ERROR at setup of test_nb_checkpoints[contents_manager1] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b43f82c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'f73bf9ac' environ = None http_port = 44739 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b43f84a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44739 jp_logging_stream = <_io.StringIO object at 0x7f21b422d9c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b429c0a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:08.511 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m1/config/jupyter_server_config.json ___________ ERROR at setup of test_nb_checkpoints[contents_manager2] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b43f9760> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '6ffff17f' environ = None http_port = 46013 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b43f8cc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46013 jp_logging_stream = <_io.StringIO object at 0x7f21b422dfc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4298f50> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:08.608 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m2/config/jupyter_server_config.json ___________ ERROR at setup of test_nb_checkpoints[contents_manager3] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b43fa660> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'ed7fbbeb' environ = None http_port = 38313 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b43f9260> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38313 jp_logging_stream = <_io.StringIO object at 0x7f21b422f940> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4343660> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:08.704 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_nb_checkpoints_contents_m3/config/jupyter_server_config.json __________ ERROR at setup of test_file_checkpoints[contents_manager0] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b43fb060> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '9a3af906' environ = None http_port = 40073 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b43f9620> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40073 jp_logging_stream = <_io.StringIO object at 0x7f21b422fe80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4340370> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:09.040 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents0/config/jupyter_server_config.json __________ ERROR at setup of test_file_checkpoints[contents_manager1] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b43fba60> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '73ed1abd' environ = None http_port = 35195 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b43fa020> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35195 jp_logging_stream = <_io.StringIO object at 0x7f21b43e4dc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b43419a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:09.134 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents1/config/jupyter_server_config.json __________ ERROR at setup of test_file_checkpoints[contents_manager2] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b43fa840> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'd96117c9' environ = None http_port = 37961 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b43f9300> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37961 jp_logging_stream = <_io.StringIO object at 0x7f21b43e53c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b43be8f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:09.233 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents2/config/jupyter_server_config.json __________ ERROR at setup of test_file_checkpoints[contents_manager3] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b43fb2e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'e48083e3' environ = None http_port = 34357 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b43740e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34357 jp_logging_stream = <_io.StringIO object at 0x7f21b43e59c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b43bc140> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:09.325 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_checkpoints_contents3/config/jupyter_server_config.json ___ ERROR at setup of test_config_did_something[AsyncGenericFileCheckpoints] ___ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4374a40> jp_server_config = {'FileContentsManager': {'checkpoints_class': }, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'FileContentsManager': {'checkpoints_class': }, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'FileContentsManager': {'checkpoints_class': }, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '102aa230' environ = None http_port = 34359 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4374860> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34359 jp_logging_stream = <_io.StringIO object at 0x7f21b43e47c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b436ae90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:09.419 ServerApp] Config changed: {'FileContentsManager': {'checkpoints_class': }, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'FileContentsManager': {'checkpoints_class': }, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn0/config DEBUG ServerApp:application.py:457 Config changed: {'FileContentsManager': {'checkpoints_class': }, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn0/config DEBUG ServerApp:application.py:457 Config changed: {'FileContentsManager': {'checkpoints_class': }, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'FileContentsManager': {'checkpoints_class': }, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn0/config/jupyter_server_config.json ______ ERROR at setup of test_config_did_something[AsyncFileCheckpoints] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4376480> jp_server_config = {'FileContentsManager': {'checkpoints_class': }, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'FileContentsManager': {'checkpoints_class': }, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'FileContentsManager': {'checkpoints_class': }, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '2cc41b20' environ = None http_port = 43689 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4375080> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43689 jp_logging_stream = <_io.StringIO object at 0x7f21b43e4ac0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b43bf6b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:09.511 ServerApp] Config changed: {'FileContentsManager': {'checkpoints_class': }, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'FileContentsManager': {'checkpoints_class': }, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn1/config DEBUG ServerApp:application.py:457 Config changed: {'FileContentsManager': {'checkpoints_class': }, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn1/config DEBUG ServerApp:application.py:457 Config changed: {'FileContentsManager': {'checkpoints_class': }, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'FileContentsManager': {'checkpoints_class': }, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_config_did_something_Asyn1/config/jupyter_server_config.json _____ ERROR at setup of test_pre_post_save_hook_config[jp_server_config0] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4376de0> jp_server_config = {'ContentsManager': {'post_save_hook': 'tests.services.contents.test_config.example_post_save_hook', 'pre_save_hook': 'tests.services.contents.test_config.example_pre_save_hook'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'ContentsManager': {'post_save_hook': 'tests.services.contents.test_config.example_post_save_hook', 'pre_save_hook': 'tests.services.contents.test_config.example_pre_save_hook'}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ContentsManager': {'post_save_hook': 'tests.services.contents.test_config.example_post_save_hook', 'pre_save_hook': 'tests.services.contents.test_config.example_pre_save_hook'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'e2b13a50' environ = None http_port = 39521 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4375760> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39521 jp_logging_stream = <_io.StringIO object at 0x7f21b43e5000> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_pre_post_save_hook_config0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_pre_post_save_hook_config0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_pre_post_save_hook_config0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4368050> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:09.604 ServerApp] Config changed: {'ContentsManager': {'pre_save_hook': 'tests.services.contents.test_config.example_pre_save_hook', 'post_save_hook': 'tests.services.contents.test_config.example_post_save_hook'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ContentsManager': {'pre_save_hook': 'tests.services.contents.test_config.example_pre_save_hook', 'post_save_hook': 'tests.services.contents.test_config.example_post_save_hook'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_pre_post_save_hook_config0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_pre_post_save_hook_config0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_pre_post_save_hook_config0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_pre_post_save_hook_config0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_pre_post_save_hook_config0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_pre_post_save_hook_config0/config DEBUG ServerApp:application.py:457 Config changed: {'ContentsManager': {'pre_save_hook': 'tests.services.contents.test_config.example_pre_save_hook', 'post_save_hook': 'tests.services.contents.test_config.example_post_save_hook'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_pre_post_save_hook_config0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_pre_post_save_hook_config0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_pre_post_save_hook_config0/config DEBUG ServerApp:application.py:457 Config changed: {'ContentsManager': {'pre_save_hook': 'tests.services.contents.test_config.example_pre_save_hook', 'post_save_hook': 'tests.services.contents.test_config.example_post_save_hook'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ContentsManager': {'pre_save_hook': 'tests.services.contents.test_config.example_pre_save_hook', 'post_save_hook': 'tests.services.contents.test_config.example_post_save_hook'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_pre_post_save_hook_config0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_pre_post_save_hook_config0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_pre_post_save_hook_config0/config/jupyter_server_config.json ________________ ERROR at setup of test_manager_no_hash_support ________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b39a2700> jp_server_config = {'ServerApp': {'contents_manager_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'contents_manager_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'contents_manager_class': , 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'e33b412d' environ = None http_port = 45577 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b39a2020> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45577 jp_logging_stream = <_io.StringIO object at 0x7f21b36f5480> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_manager_no_hash_support0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_manager_no_hash_support0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_manager_no_hash_support0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3928370> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:27.991 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': }, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': }, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_manager_no_hash_support0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_manager_no_hash_support0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_manager_no_hash_support0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_manager_no_hash_support0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_manager_no_hash_support0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_manager_no_hash_support0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': }, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_manager_no_hash_support0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_manager_no_hash_support0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_manager_no_hash_support0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': }, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'contents_manager_class': }, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_manager_no_hash_support0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_manager_no_hash_support0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_manager_no_hash_support0/config/jupyter_server_config.json __________________ ERROR at setup of test_subscribe_websocket __________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b39a28e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'a4d6f169' environ = None http_port = 42993 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b39a1c60> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42993 jp_logging_stream = <_io.StringIO object at 0x7f21b3630940> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b398e210> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:28.090 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket0/config/jupyter_server_config.json _ ERROR at setup of test_post_event[{\n "schema_id": "http://event.mock.jupyter.org/message",\n "version": 1,\n "data": {\n "event_message": "Hello, world!"\n },\n "timestamp": "2022-05-26T12:50:00+06:00Z"\n}\n] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b39a2840> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'ffb1af2e' environ = None http_port = 35363 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b39a2c00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35363 jp_logging_stream = <_io.StringIO object at 0x7f21b3631000> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b39af1b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:28.184 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema0/config/jupyter_server_config.json _ ERROR at setup of test_post_event[{\n "schema_id": "http://event.mock.jupyter.org/message",\n "version": 1,\n "data": {\n "event_message": "Hello, world!"\n }\n}\n] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b39a20c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'b5450c50' environ = None http_port = 44805 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b39a3ba0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44805 jp_logging_stream = <_io.StringIO object at 0x7f21b3631600> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b398f660> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:28.277 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event___n_____schema1/config/jupyter_server_config.json _ ERROR at setup of test_post_event_400[{\n "schema_id": "http://event.mock.jupyter.org/message",\n "data": {\n "event_message": "Hello, world!"\n }\n}\n] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b39cd1c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '6eea0287' environ = None http_port = 34693 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b39cc720> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34693 jp_logging_stream = <_io.StringIO object at 0x7f21b3630340> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b39ad180> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:28.384 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc0/config/jupyter_server_config.json _ ERROR at setup of test_post_event_400[{\n "version": 1,\n "data": {\n "event_message": "Hello, world!"\n }\n}\n] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b39cdbc0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'c366a294' environ = None http_port = 36321 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b39ccb80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36321 jp_logging_stream = <_io.StringIO object at 0x7f21b3631f00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____ve0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____ve0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____ve0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b398bc00> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:28.478 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____ve0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____ve0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____ve0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____ve0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____ve0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____ve0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____ve0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____ve0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____ve0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____ve0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____ve0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____ve0/config/jupyter_server_config.json _ ERROR at setup of test_post_event_400[{\n "schema_id": "http://event.mock.jupyter.org/message",\n "version": 1\n}\n] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b39ceac0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '321ca44a' environ = None http_port = 42449 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b39cd080> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42449 jp_logging_stream = <_io.StringIO object at 0x7f21b36313c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b398bed0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:28.580 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc1/config/jupyter_server_config.json _ ERROR at setup of test_post_event_400[{\n "schema_id": "event.mock.jupyter.org/message",\n "version": 1,\n "data": {\n "event_message": "Hello, world!"\n },\n "timestamp": "2022-05-26 12:50:00"\n}\n] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b39cf4c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'd8f96a10' environ = None http_port = 41757 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b39cda80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41757 jp_logging_stream = <_io.StringIO object at 0x7f21b3630b80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3989a90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:28.673 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event_400___n_____sc2/config/jupyter_server_config.json _ ERROR at setup of test_post_event_500[{\n "schema_id": "http://event.mock.jupyter.org/message",\n "version": 1,\n "data": {\n "message": "Hello, world!"\n }\n}\n] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b39cf920> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'd9f29ce9' environ = None http_port = 33581 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b39ce3e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33581 jp_logging_stream = <_io.StringIO object at 0x7f21b3632e00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3bda080> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:29.012 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc0/config/jupyter_server_config.json _ ERROR at setup of test_post_event_500[{\n "schema_id": "http://event.mock.jupyter.org/message",\n "version": 2,\n "data": {\n "message": "Hello, world!"\n }\n}\n] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b39ce160> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'dab3373c' environ = None http_port = 35283 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b39cee80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35283 jp_logging_stream = <_io.StringIO object at 0x7f21b3631240> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3982f80> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:29.106 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_post_event_500___n_____sc1/config/jupyter_server_config.json __________________ ERROR at setup of test_subscribe_websocket __________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b36e8400> jp_server_config = {'EventBus': {'allowed_schemas': ['http://event.mockextension.jupyter.org/message']}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.services.events.mockextension': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'EventBus': {'allowed_schemas': ['http://event.mockextension.jupyter.org/message']}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.services.events.mockextension': True}}} config = {'EventBus': {'allowed_schemas': ['http://event.mockextension.jupyter.org/message']}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True, 'tests.services.events.mockextension': True}}} default_token = '20ad277a' environ = None http_port = 38895 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b36e85e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38895 jp_logging_stream = <_io.StringIO object at 0x7f21b3632d40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b38befd0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:29.200 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'tests.services.events.mockextension': True, 'jupyter_server_terminals': True}}, 'EventBus': {'allowed_schemas': ['http://event.mockextension.jupyter.org/message']}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.services.events.mockextension': True, 'jupyter_server_terminals': True}}, 'EventBus': {'allowed_schemas': ['http://event.mockextension.jupyter.org/message']}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.services.events.mockextension': True, 'jupyter_server_terminals': True}}, 'EventBus': {'allowed_schemas': ['http://event.mockextension.jupyter.org/message']}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.services.events.mockextension': True, 'jupyter_server_terminals': True}}, 'EventBus': {'allowed_schemas': ['http://event.mockextension.jupyter.org/message']}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.services.events.mockextension': True, 'jupyter_server_terminals': True}}, 'EventBus': {'allowed_schemas': ['http://event.mockextension.jupyter.org/message']}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_subscribe_websocket1/config/jupyter_server_config.json _____________ ERROR at setup of test_no_kernels[jp_server_config0] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b36e8e00> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = '9d33fb6a' environ = None http_port = 33991 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b36e8c20> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33991 jp_logging_stream = <_io.StringIO object at 0x7f21b3631fc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b39812c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:29.305 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf0/config/jupyter_server_config.json _____________ ERROR at setup of test_no_kernels[jp_server_config1] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b36ea840> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = '47d0d898' environ = None http_port = 46461 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b36e9440> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46461 jp_logging_stream = <_io.StringIO object at 0x7f21b3633640> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b38bf9d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:29.401 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf1/config/jupyter_server_config.json _____________ ERROR at setup of test_no_kernels[jp_server_config2] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b36eb240> jp_server_config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = '02024629' environ = None http_port = 37157 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b36e9e40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37157 jp_logging_stream = <_io.StringIO object at 0x7f21b36d90c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3627020> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:29.506 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_no_kernels_jp_server_conf2/config/jupyter_server_config.json __________ ERROR at setup of test_default_kernels[jp_server_config0] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b36ebc40> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = 'b32b58cd' environ = None http_port = 35219 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b36ea200> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35219 jp_logging_stream = <_io.StringIO object at 0x7f21b36d8640> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b38bd2c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:29.603 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server0/config/jupyter_server_config.json __________ ERROR at setup of test_default_kernels[jp_server_config1] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b36e9f80> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = '52f3a0a1' environ = None http_port = 35779 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b36eb2e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35779 jp_logging_stream = <_io.StringIO object at 0x7f21b36d8280> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3624500> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:29.702 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server1/config/jupyter_server_config.json __________ ERROR at setup of test_default_kernels[jp_server_config2] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b36400e0> jp_server_config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = 'e51699b7' environ = None http_port = 35119 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b36402c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35119 jp_logging_stream = <_io.StringIO object at 0x7f21b36d8ac0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b36d7fc0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:29.798 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_default_kernels_jp_server2/config/jupyter_server_config.json ________ ERROR at setup of test_main_kernel_handler[jp_server_config0] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3641a80> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = '6433d71e' environ = None http_port = 43323 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3640c20> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43323 jp_logging_stream = <_io.StringIO object at 0x7f21b36d9540> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b36d4ff0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:29.894 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se0/config/jupyter_server_config.json ________ ERROR at setup of test_main_kernel_handler[jp_server_config1] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3642480> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = '4c365aa7' environ = None http_port = 43419 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3641080> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43419 jp_logging_stream = <_io.StringIO object at 0x7f21b36d9b40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b360bed0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:30.002 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se1/config/jupyter_server_config.json ________ ERROR at setup of test_main_kernel_handler[jp_server_config2] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3642e80> jp_server_config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = '2ed51743' environ = None http_port = 34663 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3641440> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34663 jp_logging_stream = <_io.StringIO object at 0x7f21b36da140> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b36d4b90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:30.099 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_main_kernel_handler_jp_se2/config/jupyter_server_config.json ___________ ERROR at setup of test_kernel_handler[jp_server_config0] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3643880> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = '362c6c1a' environ = None http_port = 43891 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3641e40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43891 jp_logging_stream = <_io.StringIO object at 0x7f21b36da740> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3609e50> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:30.203 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_0/config/jupyter_server_config.json ___________ ERROR at setup of test_kernel_handler[jp_server_config1] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3642520> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = 'a5b8aa1c' environ = None http_port = 37777 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3642660> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37777 jp_logging_stream = <_io.StringIO object at 0x7f21b36dad40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b38cbbb0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:30.300 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_1/config/jupyter_server_config.json ___________ ERROR at setup of test_kernel_handler[jp_server_config2] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3641bc0> jp_server_config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = 'e1184dba' environ = None http_port = 33965 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3643ba0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33965 jp_logging_stream = <_io.StringIO object at 0x7f21b36db340> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b36094a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:30.398 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_jp_server_2/config/jupyter_server_config.json ____ ERROR at setup of test_kernel_handler_startup_error[jp_server_config0] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b38b51c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = '046f6b68' environ = None http_port = 44067 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b38b4720> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44067 jp_logging_stream = <_io.StringIO object at 0x7f21b388c880> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b38ca8a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:30.508 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er0/config/jupyter_server_config.json ____ ERROR at setup of test_kernel_handler_startup_error[jp_server_config1] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b38b60c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = '38e389aa' environ = None http_port = 43685 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b38b4cc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43685 jp_logging_stream = <_io.StringIO object at 0x7f21b388c4c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b38f7f70> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:30.601 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er1/config/jupyter_server_config.json ____ ERROR at setup of test_kernel_handler_startup_error[jp_server_config2] ____ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b38b65c0> jp_server_config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = 'fdb0e7a2' environ = None http_port = 34957 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b38b4fe0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34957 jp_logging_stream = <_io.StringIO object at 0x7f21b388cc40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b38f70c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:30.695 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er2/config/jupyter_server_config.json _ ERROR at setup of test_kernel_handler_startup_error_pending[jp_server_config0] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b38b7420> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = '53e64eae' environ = None http_port = 40855 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b38b5760> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40855 jp_logging_stream = <_io.StringIO object at 0x7f21b388c580> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b38e7b10> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:30.780 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er3/config/jupyter_server_config.json _ ERROR at setup of test_kernel_handler_startup_error_pending[jp_server_config1] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b38b7ec0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = '5f124100' environ = None http_port = 37205 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b38b6200> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37205 jp_logging_stream = <_io.StringIO object at 0x7f21b388d180> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b38c9630> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:31.030 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er4/config/jupyter_server_config.json _ ERROR at setup of test_kernel_handler_startup_error_pending[jp_server_config2] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b38b4360> jp_server_config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = 'd01449d0' environ = None http_port = 46447 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b38b7740> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46447 jp_logging_stream = <_io.StringIO object at 0x7f21b388d780> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b38e5db0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:31.113 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_handler_startup_er5/config/jupyter_server_config.json _____________ ERROR at setup of test_connection[jp_server_config0] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b380d940> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = 'e4b6671a' environ = None http_port = 34665 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b380dd00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34665 jp_logging_stream = <_io.StringIO object at 0x7f21b388e380> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b38e5090> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:31.195 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf0/config/jupyter_server_config.json ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:31.286 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf1/config/jupyter_server_config.json _____________ ERROR at setup of test_connection[jp_server_config1] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b380ed40> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = '6296660a' environ = None http_port = 46229 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b380eb60> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46229 jp_logging_stream = <_io.StringIO object at 0x7f21b388ef80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b38f4690> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:31.369 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf2/config/jupyter_server_config.json ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:31.455 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf3/config/jupyter_server_config.json _____________ ERROR at setup of test_connection[jp_server_config2] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b380fec0> jp_server_config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = '1854d403' environ = None http_port = 44987 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b380e700> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44987 jp_logging_stream = <_io.StringIO object at 0x7f21b37dcf40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b349e940> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:31.537 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf4/config/jupyter_server_config.json ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:31.620 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_connection_jp_server_conf5/config/jupyter_server_config.json ________________________ ERROR at setup of test_config _________________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b380c860> jp_server_config = {'ServerApp': {'MappingKernelManager': {'allowed_message_types': ['kernel_info_request']}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'MappingKernelManager': {'allowed_message_types': ['kernel_info_request']}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'MappingKernelManager': {'allowed_message_types': ['kernel_info_request']}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '43379b1a' environ = None http_port = 41479 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b380f880> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41479 jp_logging_stream = <_io.StringIO object at 0x7f21b37dd6c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_config0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_config0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_config0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b37872f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:31.700 ServerApp] Config changed: {'ServerApp': {'MappingKernelManager': {'allowed_message_types': ['kernel_info_request']}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'MappingKernelManager': {'allowed_message_types': ['kernel_info_request']}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_config0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_config0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_config0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_config0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_config0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_config0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'MappingKernelManager': {'allowed_message_types': ['kernel_info_request']}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_config0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_config0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_config0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'MappingKernelManager': {'allowed_message_types': ['kernel_info_request']}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'MappingKernelManager': {'allowed_message_types': ['kernel_info_request']}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_config0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_config0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_config0/config/jupyter_server_config.json _________________ ERROR at setup of test_websocket_connection __________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b37ce480> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '9c6f34c8' environ = None http_port = 43201 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b37ce3e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43201 jp_logging_stream = <_io.StringIO object at 0x7f21b37de680> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b38e5d60> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:31.887 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection0/config/jupyter_server_config.json _____________ ERROR at setup of test_cull_idle[jp_server_config0] ______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b37cc900> jp_server_config = {'ServerApp': {'MappingKernelManager': {'cull_connected': False, 'cull_idle_timeout': 5, 'cull_interval': 1}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'MappingKernelManager': {'cull_connected': False, 'cull_idle_timeout': 5, 'cull_interval': 1}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'MappingKernelManager': {'cull_connected': False, 'cull_idle_timeout': 5, 'cull_interval': 1}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = 'bbdb35ad' environ = None http_port = 40721 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b37cd4e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40721 jp_logging_stream = <_io.StringIO object at 0x7f21b37dd3c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b37868f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:31.977 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'MappingKernelManager': {'cull_idle_timeout': 5, 'cull_interval': 1, 'cull_connected': False}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'MappingKernelManager': {'cull_idle_timeout': 5, 'cull_interval': 1, 'cull_connected': False}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'MappingKernelManager': {'cull_idle_timeout': 5, 'cull_interval': 1, 'cull_connected': False}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'MappingKernelManager': {'cull_idle_timeout': 5, 'cull_interval': 1, 'cull_connected': False}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'MappingKernelManager': {'cull_idle_timeout': 5, 'cull_interval': 1, 'cull_connected': False}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi0/config/jupyter_server_config.json _____________ ERROR at setup of test_cull_idle[jp_server_config1] ______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b37cfc40> jp_server_config = {'ServerApp': {'AsyncMappingKernelManager': {'cull_connected': False, 'cull_idle_timeout': 5, 'cull_interval': 1}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'AsyncMappingKernelManager': {'cull_connected': False, 'cull_idle_timeout': 5, 'cull_interval': 1}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'AsyncMappingKernelManager': {'cull_connected': False, 'cull_idle_timeout': 5, 'cull_interval': 1}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = 'f5dfcd1e' environ = None http_port = 34351 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b37ce980> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34351 jp_logging_stream = <_io.StringIO object at 0x7f21b37df400> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b376ecb0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:32.080 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'AsyncMappingKernelManager': {'cull_idle_timeout': 5, 'cull_interval': 1, 'cull_connected': False}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'AsyncMappingKernelManager': {'cull_idle_timeout': 5, 'cull_interval': 1, 'cull_connected': False}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'AsyncMappingKernelManager': {'cull_idle_timeout': 5, 'cull_interval': 1, 'cull_connected': False}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'AsyncMappingKernelManager': {'cull_idle_timeout': 5, 'cull_interval': 1, 'cull_connected': False}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'AsyncMappingKernelManager': {'cull_idle_timeout': 5, 'cull_interval': 1, 'cull_connected': False}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_jp_server_confi1/config/jupyter_server_config.json ___________________ ERROR at setup of test_cull_idle_disable ___________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b37ccf40> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'b1487f04' environ = None http_port = 39989 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b37cf2e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39989 jp_logging_stream = <_io.StringIO object at 0x7f21b37dd300> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_disable0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_disable0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_disable0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b376f340> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:32.180 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_disable0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_disable0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_disable0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_disable0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_disable0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_disable0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_disable0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_disable0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_disable0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_disable0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_disable0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_cull_idle_disable0/config/jupyter_server_config.json _____________ ERROR at setup of test_cull_dead[jp_server_config0] ______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b37cfce0> jp_server_config = {'ServerApp': {'AsyncMappingKernelManager': {'cull_connected': False, 'cull_idle_timeout': 5, 'cull_interval': 1, 'default_kernel_name': 'bad', 'use_pending_kernels': True}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'AsyncMappingKernelManager': {'cull_connected': False, 'cull_idle_timeout': 5, 'cull_interval': 1, 'default_kernel_name': 'bad', 'use_pending_kernels': True}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'AsyncMappingKernelManager': {'cull_connected': False, 'cull_idle_timeout': 5, 'cull_interval': 1, 'default_kernel_name': 'bad', 'use_pending_kernels': True}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = 'b085c4ac' environ = None http_port = 40775 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b37e4180> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40775 jp_logging_stream = <_io.StringIO object at 0x7f21b37df340> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_cull_dead_jp_server_confi0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_cull_dead_jp_server_confi0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_cull_dead_jp_server_confi0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b376aa80> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:32.278 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'AsyncMappingKernelManager': {'cull_idle_timeout': 5, 'cull_interval': 1, 'cull_connected': False, 'default_kernel_name': 'bad', 'use_pending_kernels': True}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'AsyncMappingKernelManager': {'cull_idle_timeout': 5, 'cull_interval': 1, 'cull_connected': False, 'default_kernel_name': 'bad', 'use_pending_kernels': True}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_cull_dead_jp_server_confi0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_cull_dead_jp_server_confi0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_cull_dead_jp_server_confi0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_dead_jp_server_confi0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_dead_jp_server_confi0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_dead_jp_server_confi0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'AsyncMappingKernelManager': {'cull_idle_timeout': 5, 'cull_interval': 1, 'cull_connected': False, 'default_kernel_name': 'bad', 'use_pending_kernels': True}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_dead_jp_server_confi0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_dead_jp_server_confi0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_cull_dead_jp_server_confi0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'AsyncMappingKernelManager': {'cull_idle_timeout': 5, 'cull_interval': 1, 'cull_connected': False, 'default_kernel_name': 'bad', 'use_pending_kernels': True}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'AsyncMappingKernelManager': {'cull_idle_timeout': 5, 'cull_interval': 1, 'cull_connected': False, 'default_kernel_name': 'bad', 'use_pending_kernels': True}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_cull_dead_jp_server_confi0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_cull_dead_jp_server_confi0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_cull_dead_jp_server_confi0/config/jupyter_server_config.json _________________ ERROR at setup of test_list_kernelspecs_bad __________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3435120> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'e80aedd5' environ = None http_port = 33569 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3434040> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33569 jp_logging_stream = <_io.StringIO object at 0x7f21b35e4280> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs_bad0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs_bad0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs_bad0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b34fb930> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:34.245 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs_bad0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs_bad0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs_bad0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs_bad0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs_bad0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs_bad0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs_bad0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs_bad0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs_bad0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs_bad0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs_bad0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs_bad0/config/jupyter_server_config.json ___________________ ERROR at setup of test_list_kernelspecs ____________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3436700> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '5073a516' environ = None http_port = 36711 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3435300> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36711 jp_logging_stream = <_io.StringIO object at 0x7f21b35e4c40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b38bd9f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:34.343 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_kernelspecs0/config/jupyter_server_config.json ____________________ ERROR at setup of test_get_kernelspecs ____________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3436ac0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '29fdba84' environ = None http_port = 44453 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3435bc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44453 jp_logging_stream = <_io.StringIO object at 0x7f21b35e5300> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_kernelspecs0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_kernelspecs0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_kernelspecs0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b34fa260> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:34.453 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_kernelspecs0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_kernelspecs0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_kernelspecs0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_kernelspecs0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_kernelspecs0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_kernelspecs0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_kernelspecs0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_kernelspecs0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_kernelspecs0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_kernelspecs0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_kernelspecs0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_kernelspecs0/config/jupyter_server_config.json ______________ ERROR at setup of test_get_nonexistant_kernelspec _______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3437880> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '73e595d2' environ = None http_port = 36367 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3435ee0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36367 jp_logging_stream = <_io.StringIO object at 0x7f21b35e50c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_kernelspe0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_kernelspe0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_kernelspe0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3477ed0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:34.553 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_kernelspe0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_kernelspe0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_kernelspe0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_kernelspe0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_kernelspe0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_kernelspe0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_kernelspe0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_kernelspe0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_kernelspe0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_kernelspe0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_kernelspe0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_kernelspe0/config/jupyter_server_config.json _______________ ERROR at setup of test_get_kernel_resource_file ________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3435f80> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'e7709420' environ = None http_port = 37057 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b34365c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37057 jp_logging_stream = <_io.StringIO object at 0x7f21b35e4400> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_kernel_resource_file0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_kernel_resource_file0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_kernel_resource_file0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3474550> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:34.657 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_kernel_resource_file0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_kernel_resource_file0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_kernel_resource_file0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_kernel_resource_file0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_kernel_resource_file0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_kernel_resource_file0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_kernel_resource_file0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_kernel_resource_file0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_kernel_resource_file0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_kernel_resource_file0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_kernel_resource_file0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_kernel_resource_file0/config/jupyter_server_config.json _______________ ERROR at setup of test_get_nonexistant_resource ________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3434a40> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '8c6536dc' environ = None http_port = 42133 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3437b00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42133 jp_logging_stream = <_io.StringIO object at 0x7f21b35e4880> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_resource0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_resource0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_resource0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3476c60> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:34.755 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_resource0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_resource0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_resource0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_resource0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_resource0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_resource0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_resource0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_resource0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_resource0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_resource0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_resource0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_nonexistant_resource0/config/jupyter_server_config.json _____________________ ERROR at setup of test_list_formats ______________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3519580> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'c78c2bb5' environ = None http_port = 43445 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3518360> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43445 jp_logging_stream = <_io.StringIO object at 0x7f21b35e4e80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_formats0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_formats0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_formats0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b353e850> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:34.855 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_formats0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_formats0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_formats0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_formats0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_formats0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_formats0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_formats0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_formats0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_formats0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_formats0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_formats0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_formats0/config/jupyter_server_config.json _______________ ERROR at setup of test_create[jp_server_config0] _______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3518b80> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = '40d56ba2' environ = None http_port = 34293 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b35189a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34293 jp_logging_stream = <_io.StringIO object at 0x7f21b35e5d80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config0_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config0_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config0_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b353eb20> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:34.965 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config0_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config0_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config0_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config0_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config0_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config0_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config0_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config0_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config0_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config0_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config0_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config0_0/config/jupyter_server_config.json _______________ ERROR at setup of test_create[jp_server_config1] _______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b351ab60> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = 'deb3a766' environ = None http_port = 35693 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3519760> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35693 jp_logging_stream = <_io.StringIO object at 0x7f21b35e6380> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config1_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config1_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config1_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3563e80> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:35.064 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config1_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config1_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config1_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config1_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config1_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config1_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config1_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config1_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config1_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config1_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config1_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config1_0/config/jupyter_server_config.json _______________ ERROR at setup of test_create[jp_server_config2] _______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b351b560> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = '7400847f' environ = None http_port = 35341 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b351a160> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35341 jp_logging_stream = <_io.StringIO object at 0x7f21b35e6980> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config2_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config2_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config2_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b353e2b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:35.174 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config2_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config2_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config2_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config2_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config2_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config2_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config2_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config2_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config2_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config2_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config2_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config2_0/config/jupyter_server_config.json _______________ ERROR at setup of test_create[jp_server_config3] _______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b351bf60> jp_server_config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = '7106d911' environ = None http_port = 33661 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b351a520> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33661 jp_logging_stream = <_io.StringIO object at 0x7f21b35e6f80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config3_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config3_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config3_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3561fe0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:35.273 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config3_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config3_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config3_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config3_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config3_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config3_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config3_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config3_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config3_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config3_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config3_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_jp_server_config3_0/config/jupyter_server_config.json _____________ ERROR at setup of test_create_bad[jp_server_config0] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b351a2a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = '92331404' environ = None http_port = 42489 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b351b600> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42489 jp_logging_stream = <_io.StringIO object at 0x7f21b35e7700> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3583200> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:35.375 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf0/config/jupyter_server_config.json _____________ ERROR at setup of test_create_bad[jp_server_config1] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3324400> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = 'ca6200c8' environ = None http_port = 36245 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b33245e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36245 jp_logging_stream = <_io.StringIO object at 0x7f21b35350c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3560460> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:35.475 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf1/config/jupyter_server_config.json _____________ ERROR at setup of test_create_bad[jp_server_config2] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3325da0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = '2f4fd457' environ = None http_port = 44513 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3324f40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44513 jp_logging_stream = <_io.StringIO object at 0x7f21b3534640> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3582bc0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:35.575 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf2/config/jupyter_server_config.json _____________ ERROR at setup of test_create_bad[jp_server_config3] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b33262a0> jp_server_config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = 'a62deff3' environ = None http_port = 35529 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3325260> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35529 jp_logging_stream = <_io.StringIO object at 0x7f21b3534340> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b35a3d90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:35.686 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_jp_server_conf3/config/jupyter_server_config.json _________ ERROR at setup of test_create_bad_pending[jp_server_config0] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b33271a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = 'e42c1ad9' environ = None http_port = 38399 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3325760> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38399 jp_logging_stream = <_io.StringIO object at 0x7f21b3534ac0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b35824e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:35.786 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser0/config/jupyter_server_config.json _________ ERROR at setup of test_create_bad_pending[jp_server_config1] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3327ba0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = 'e4d2375b' environ = None http_port = 39007 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3326160> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39007 jp_logging_stream = <_io.StringIO object at 0x7f21b3535540> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b353f3e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:36.180 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser1/config/jupyter_server_config.json _________ ERROR at setup of test_create_bad_pending[jp_server_config2] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3325ee0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = '00e97147' environ = None http_port = 35999 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3327240> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35999 jp_logging_stream = <_io.StringIO object at 0x7f21b3535b40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b35a2e40> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:36.278 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser2/config/jupyter_server_config.json _________ ERROR at setup of test_create_bad_pending[jp_server_config3] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3327c40> jp_server_config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = '9dd17587' environ = None http_port = 45947 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b33d0220> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45947 jp_logging_stream = <_io.StringIO object at 0x7f21b3536140> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b33c5e50> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:36.379 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_bad_pending_jp_ser3/config/jupyter_server_config.json ________ ERROR at setup of test_create_file_session[jp_server_config0] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b33d14e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = '824c60a0' environ = None http_port = 41251 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b33d0a40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41251 jp_logging_stream = <_io.StringIO object at 0x7f21b3536740> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b32ae9e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:36.477 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se0/config/jupyter_server_config.json ________ ERROR at setup of test_create_file_session[jp_server_config1] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b33d23e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = '9847515e' environ = None http_port = 41853 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b33d0fe0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41853 jp_logging_stream = <_io.StringIO object at 0x7f21b3536d40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b33c4b40> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:36.576 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se1/config/jupyter_server_config.json ________ ERROR at setup of test_create_file_session[jp_server_config2] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b33d2de0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = '2431bcf7' environ = None http_port = 39125 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b33d13a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39125 jp_logging_stream = <_io.StringIO object at 0x7f21b3537340> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b33c40a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:36.685 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se2/config/jupyter_server_config.json ________ ERROR at setup of test_create_file_session[jp_server_config3] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b33d37e0> jp_server_config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = '85206476' environ = None http_port = 43755 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b33d1da0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43755 jp_logging_stream = <_io.StringIO object at 0x7f21b33c0880> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3330d70> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:36.782 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_file_session_jp_se3/config/jupyter_server_config.json _______ ERROR at setup of test_create_console_session[jp_server_config0] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b33d27a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = '8580617e' environ = None http_port = 40935 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b33d2660> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40935 jp_logging_stream = <_io.StringIO object at 0x7f21b33c04c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3331860> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:36.887 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp0/config/jupyter_server_config.json _______ ERROR at setup of test_create_console_session[jp_server_config1] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b33d1a80> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = 'f0eef970' environ = None http_port = 34915 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b33d3a60> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34915 jp_logging_stream = <_io.StringIO object at 0x7f21b33c0c40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b333bcf0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:36.984 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp1/config/jupyter_server_config.json _______ ERROR at setup of test_create_console_session[jp_server_config2] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b33bd120> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = '3dc4671b' environ = None http_port = 37085 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b33bc680> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37085 jp_logging_stream = <_io.StringIO object at 0x7f21b33c0580> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b33300a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:37.081 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp2/config/jupyter_server_config.json _______ ERROR at setup of test_create_console_session[jp_server_config3] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b33be020> jp_server_config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = '1f053a25' environ = None http_port = 33013 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b33bcc20> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33013 jp_logging_stream = <_io.StringIO object at 0x7f21b33c1180> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b33380a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:37.186 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_console_session_jp3/config/jupyter_server_config.json _________ ERROR at setup of test_create_deprecated[jp_server_config0] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b33bea20> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = '53cea34f' environ = None http_port = 35527 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b33bcfe0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35527 jp_logging_stream = <_io.StringIO object at 0x7f21b33c1780> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b33fb160> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:37.281 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv0/config/jupyter_server_config.json _________ ERROR at setup of test_create_deprecated[jp_server_config1] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b33bf420> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = '1d485d88' environ = None http_port = 39105 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b33bd9e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39105 jp_logging_stream = <_io.StringIO object at 0x7f21b33c1d80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b35605f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:37.378 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv1/config/jupyter_server_config.json _________ ERROR at setup of test_create_deprecated[jp_server_config2] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b33bfe20> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = 'f2561a25' environ = None http_port = 44975 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b33be3e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44975 jp_logging_stream = <_io.StringIO object at 0x7f21b33c2380> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b333bfc0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:37.471 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv2/config/jupyter_server_config.json _________ ERROR at setup of test_create_deprecated[jp_server_config3] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b33be160> jp_server_config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = 'f3d84db4' environ = None http_port = 43719 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b33bf4c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43719 jp_logging_stream = <_io.StringIO object at 0x7f21b33c2980> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b32baee0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:37.566 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_deprecated_jp_serv3/config/jupyter_server_config.json _______ ERROR at setup of test_create_with_kernel_id[jp_server_config0] ________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b32782c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = 'abd74576' environ = None http_port = 43457 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b32784a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43457 jp_logging_stream = <_io.StringIO object at 0x7f21b33c2f80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b33f8320> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:37.662 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_0/config/jupyter_server_config.json _______ ERROR at setup of test_create_with_kernel_id[jp_server_config1] ________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3279c60> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = '09b73353' environ = None http_port = 32943 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3278e00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 32943 jp_logging_stream = <_io.StringIO object at 0x7f21b33c3580> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b32b8410> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:37.755 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_1/config/jupyter_server_config.json _______ ERROR at setup of test_create_with_kernel_id[jp_server_config2] ________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b327a660> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = 'fc4d9f25' environ = None http_port = 45679 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3279260> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45679 jp_logging_stream = <_io.StringIO object at 0x7f21b3224f40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3277a20> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:37.859 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_2/config/jupyter_server_config.json _______ ERROR at setup of test_create_with_kernel_id[jp_server_config3] ________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b327ab60> jp_server_config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = 'f72db5c0' environ = None http_port = 35069 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3279580> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35069 jp_logging_stream = <_io.StringIO object at 0x7f21b32244c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b32b9d10> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:37.954 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_kernel_id_jp_3/config/jupyter_server_config.json _____ ERROR at setup of test_create_with_bad_kernel_id[jp_server_config0] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b327ba60> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = '9487c83f' environ = None http_port = 44887 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b327a020> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44887 jp_logging_stream = <_io.StringIO object at 0x7f21b32241c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b38f7cf0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:38.318 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id0/config/jupyter_server_config.json _____ ERROR at setup of test_create_with_bad_kernel_id[jp_server_config1] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b327a840> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = 'cebafa43' environ = None http_port = 34501 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3278900> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34501 jp_logging_stream = <_io.StringIO object at 0x7f21b3224940> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b32e28a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:38.408 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id1/config/jupyter_server_config.json _____ ERROR at setup of test_create_with_bad_kernel_id[jp_server_config2] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b327b920> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = 'db36cd95' environ = None http_port = 35937 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b32cc0e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35937 jp_logging_stream = <_io.StringIO object at 0x7f21b32253c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b32e1c70> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:38.503 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id2/config/jupyter_server_config.json _____ ERROR at setup of test_create_with_bad_kernel_id[jp_server_config3] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b32cd8a0> jp_server_config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = '60856e75' environ = None http_port = 37957 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b32cca40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37957 jp_logging_stream = <_io.StringIO object at 0x7f21b32259c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2e65f40> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:38.597 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_create_with_bad_kernel_id3/config/jupyter_server_config.json _______________ ERROR at setup of test_delete[jp_server_config0] _______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b32cdda0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = 'ab3f116f' environ = None http_port = 45031 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b32ccd60> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45031 jp_logging_stream = <_io.StringIO object at 0x7f21b3225fc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config0_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config0_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config0_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2e73ed0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:38.691 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config0_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config0_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config0_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config0_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config0_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config0_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config0_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config0_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config0_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config0_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config0_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config0_0/config/jupyter_server_config.json _______________ ERROR at setup of test_delete[jp_server_config1] _______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b32ceca0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = '1def2cf4' environ = None http_port = 33809 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b32cd260> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33809 jp_logging_stream = <_io.StringIO object at 0x7f21b32265c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config1_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config1_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config1_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b32e2d50> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:38.795 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config1_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config1_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config1_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config1_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config1_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config1_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config1_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config1_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config1_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config1_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config1_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config1_0/config/jupyter_server_config.json _______________ ERROR at setup of test_delete[jp_server_config2] _______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b32cf6a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = 'b1663a6b' environ = None http_port = 34519 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b32cdc60> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34519 jp_logging_stream = <_io.StringIO object at 0x7f21b3226bc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config2_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config2_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config2_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2e66d00> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:38.890 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config2_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config2_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config2_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config2_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config2_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config2_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config2_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config2_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config2_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config2_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config2_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config2_0/config/jupyter_server_config.json _______________ ERROR at setup of test_delete[jp_server_config3] _______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b32ce5c0> jp_server_config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = '1685e7f2' environ = None http_port = 38325 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b32ce3e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38325 jp_logging_stream = <_io.StringIO object at 0x7f21b32271c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config3_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config3_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config3_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2e70280> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:38.988 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config3_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config3_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config3_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config3_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config3_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config3_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config3_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config3_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config3_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config3_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config3_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_server_config3_0/config/jupyter_server_config.json ____________ ERROR at setup of test_modify_path[jp_server_config0] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b32ce480> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = '63e9da26' environ = None http_port = 39005 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b32cf880> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39005 jp_logging_stream = <_io.StringIO object at 0x7f21b32277c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2e64140> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:39.083 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con0/config/jupyter_server_config.json ____________ ERROR at setup of test_modify_path[jp_server_config1] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2e90540> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = 'aa62f69e' environ = None http_port = 45199 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2e90720> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45199 jp_logging_stream = <_io.StringIO object at 0x7f21b2ee1180> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2e532a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:39.177 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con1/config/jupyter_server_config.json ____________ ERROR at setup of test_modify_path[jp_server_config2] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2e91ee0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = '93ab5e08' environ = None http_port = 33815 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2e91080> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33815 jp_logging_stream = <_io.StringIO object at 0x7f21b2ee0700> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2e64d70> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:39.277 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con2/config/jupyter_server_config.json ____________ ERROR at setup of test_modify_path[jp_server_config3] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2e928e0> jp_server_config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = '687fb9f9' environ = None http_port = 41103 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2e914e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41103 jp_logging_stream = <_io.StringIO object at 0x7f21b2ee0400> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2e52f30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:39.369 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_jp_server_con3/config/jupyter_server_config.json _______ ERROR at setup of test_modify_path_deprecated[jp_server_config0] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2e932e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = '9dfbc6c2' environ = None http_port = 43191 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2e918a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43191 jp_logging_stream = <_io.StringIO object at 0x7f21b2ee0b80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2eeb840> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:39.470 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp0/config/jupyter_server_config.json _______ ERROR at setup of test_modify_path_deprecated[jp_server_config1] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2e93ce0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = '18da6a1a' environ = None http_port = 45211 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2e922a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45211 jp_logging_stream = <_io.StringIO object at 0x7f21b2ee1600> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2e51cc0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:39.564 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp1/config/jupyter_server_config.json _______ ERROR at setup of test_modify_path_deprecated[jp_server_config2] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2e92020> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = '4cd77e9e' environ = None http_port = 40605 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2e93380> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40605 jp_logging_stream = <_io.StringIO object at 0x7f21b2ee1c00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2e65270> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:39.660 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp2/config/jupyter_server_config.json _______ ERROR at setup of test_modify_path_deprecated[jp_server_config3] _______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2d1c180> jp_server_config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = '45084431' environ = None http_port = 45635 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2d1c360> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45635 jp_logging_stream = <_io.StringIO object at 0x7f21b2ee2200> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2ecbed0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:39.752 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_path_deprecated_jp3/config/jupyter_server_config.json ____________ ERROR at setup of test_modify_type[jp_server_config0] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2d1db20> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = 'a781d1a1' environ = None http_port = 38591 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2d1ccc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38591 jp_logging_stream = <_io.StringIO object at 0x7f21b2ee2800> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2ecaad0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:39.846 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con0/config/jupyter_server_config.json ____________ ERROR at setup of test_modify_type[jp_server_config1] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2d1e520> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = 'd84f47d5' environ = None http_port = 45937 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2d1d120> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45937 jp_logging_stream = <_io.StringIO object at 0x7f21b2ee2e00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2d97d40> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:39.949 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con1/config/jupyter_server_config.json ____________ ERROR at setup of test_modify_type[jp_server_config2] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2d1ef20> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = 'ef88c29d' environ = None http_port = 34943 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2d1d4e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34943 jp_logging_stream = <_io.StringIO object at 0x7f21b2ee3400> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2ec8cd0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:40.043 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con2/config/jupyter_server_config.json ____________ ERROR at setup of test_modify_type[jp_server_config3] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2d1f920> jp_server_config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = '6161d3c8' environ = None http_port = 41035 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2d1dee0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41035 jp_logging_stream = <_io.StringIO object at 0x7f21b2d48dc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2d97980> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:40.427 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_type_jp_server_con3/config/jupyter_server_config.json _________ ERROR at setup of test_modify_kernel_name[jp_server_config0] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2d1e660> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = 'baacfdf6' environ = None http_port = 44643 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2d1dbc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44643 jp_logging_stream = <_io.StringIO object at 0x7f21b2d48700> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2d472a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:40.519 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser0/config/jupyter_server_config.json _________ ERROR at setup of test_modify_kernel_name[jp_server_config1] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2d1c7c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = '3f4ac3d6' environ = None http_port = 41019 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2d1fce0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41019 jp_logging_stream = <_io.StringIO object at 0x7f21b2d48100> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2d46c10> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:40.612 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser1/config/jupyter_server_config.json _________ ERROR at setup of test_modify_kernel_name[jp_server_config2] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2d6d760> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = '93d0b5fd' environ = None http_port = 45637 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2d6c900> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45637 jp_logging_stream = <_io.StringIO object at 0x7f21b2d487c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2d47bb0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:40.702 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser2/config/jupyter_server_config.json _________ ERROR at setup of test_modify_kernel_name[jp_server_config3] _________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2d6e160> jp_server_config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = '78447107' environ = None http_port = 41239 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2d6cd60> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41239 jp_logging_stream = <_io.StringIO object at 0x7f21b2d49240> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2ceb610> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:40.796 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_name_jp_ser3/config/jupyter_server_config.json __________ ERROR at setup of test_modify_kernel_id[jp_server_config0] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2d6e660> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = '1613872a' environ = None http_port = 34535 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2d6d080> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34535 jp_logging_stream = <_io.StringIO object at 0x7f21b2d49840> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2d45450> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:40.898 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve0/config/jupyter_server_config.json __________ ERROR at setup of test_modify_kernel_id[jp_server_config1] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2d6f560> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = '6a5a5b3d' environ = None http_port = 42801 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2d6db20> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42801 jp_logging_stream = <_io.StringIO object at 0x7f21b2d49e40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2ce9fe0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:40.991 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve1/config/jupyter_server_config.json __________ ERROR at setup of test_modify_kernel_id[jp_server_config2] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2d6ff60> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = 'd75508c6' environ = None http_port = 45993 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2d6e520> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45993 jp_logging_stream = <_io.StringIO object at 0x7f21b2d4a440> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2ceb570> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:41.088 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve2/config/jupyter_server_config.json __________ ERROR at setup of test_modify_kernel_id[jp_server_config3] __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2d6e2a0> jp_server_config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = 'd8e3a918' environ = None http_port = 42781 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2d6f600> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42781 jp_logging_stream = <_io.StringIO object at 0x7f21b2d4aa40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2da8230> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:41.183 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_modify_kernel_id_jp_serve3/config/jupyter_server_config.json ___________ ERROR at setup of test_restart_kernel[jp_server_config0] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2c91800> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager'}} default_token = '78498230' environ = None http_port = 46389 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2c91bc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46389 jp_logging_stream = <_io.StringIO object at 0x7f21b2d4b640> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2dc4730> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:41.278 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_0/config/jupyter_server_config.json ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:41.382 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.MappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_1/config/jupyter_server_config.json ___________ ERROR at setup of test_restart_kernel[jp_server_config1] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2c92c00> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}} default_token = 'e2baf658' environ = None http_port = 46769 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2c92a20> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46769 jp_logging_stream = <_io.StringIO object at 0x7f21b2cb4580> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2dc4050> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:41.477 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_2/config/jupyter_server_config.json ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:41.579 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_3/config/jupyter_server_config.json ___________ ERROR at setup of test_restart_kernel[jp_server_config2] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2c93d80> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = 'c766f10e' environ = None http_port = 35435 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2c93ba0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35435 jp_logging_stream = <_io.StringIO object at 0x7f21b2cb4a00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2cdc190> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:41.673 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_4/config/jupyter_server_config.json ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:41.768 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_5/config/jupyter_server_config.json ___________ ERROR at setup of test_restart_kernel[jp_server_config3] ___________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2c93f60> jp_server_config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} config = {'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager'}} default_token = '77691605' environ = None http_port = 40741 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2c60220> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40741 jp_logging_stream = <_io.StringIO object at 0x7f21b2cb5a80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_7/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_7/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2ce6030> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:41.863 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_6/config/jupyter_server_config.json ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:41.959 ServerApp] Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'kernel_manager_class': 'tests.services.sessions.test_api.NewPortsMappingKernelManager', 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'AsyncMappingKernelManager': {'use_pending_kernels': True}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_restart_kernel_jp_server_7/config/jupyter_server_config.json _ ERROR at setup of test_file_types[jupyter_server.files.handlers.FilesHandler] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2c242c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'bbc52b46' environ = None http_port = 44883 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2c24400> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44883 jp_logging_stream = <_io.StringIO object at 0x7f21b2cb7880> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2cbc3c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:45.211 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server0/config/jupyter_server_config.json _ ERROR at setup of test_file_types[jupyter_server.base.handlers.AuthenticatedFileHandler] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2c63920> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'f2751ffb' environ = None http_port = 38559 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2c63c40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38559 jp_logging_stream = <_io.StringIO object at 0x7f21b2ccc7c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2cbd810> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:45.307 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_file_types_jupyter_server1/config/jupyter_server_config.json _ ERROR at setup of test_hidden_files[maybe_hidden0-jupyter_server.files.handlers.FilesHandler] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2c61da0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'daecd9b3' environ = None http_port = 39737 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2c24f40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39737 jp_logging_stream = <_io.StringIO object at 0x7f21b2cb6140> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2eca580> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:45.687 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden0/config/jupyter_server_config.json _ ERROR at setup of test_hidden_files[maybe_hidden0-jupyter_server.base.handlers.AuthenticatedFileHandler] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2c24860> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'b00b730f' environ = None http_port = 46553 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2c24680> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46553 jp_logging_stream = <_io.StringIO object at 0x7f21b2cb7940> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2eca800> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:45.781 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden1/config/jupyter_server_config.json _ ERROR at setup of test_hidden_files[maybe_hidden1-jupyter_server.files.handlers.FilesHandler] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2c26660> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '7e62f37e' environ = None http_port = 36767 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2c25620> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36767 jp_logging_stream = <_io.StringIO object at 0x7f21b2ccc280> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2c439d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:45.874 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden2/config/jupyter_server_config.json _ ERROR at setup of test_hidden_files[maybe_hidden1-jupyter_server.base.handlers.AuthenticatedFileHandler] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2c274c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '78fad1a7' environ = None http_port = 43977 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2c25760> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43977 jp_logging_stream = <_io.StringIO object at 0x7f21b2ccd540> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2b4fde0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:45.980 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden3/config/jupyter_server_config.json _ ERROR at setup of test_hidden_files[maybe_hidden2-jupyter_server.files.handlers.FilesHandler] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2c262a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '5a01eb14' environ = None http_port = 39783 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2c26ca0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39783 jp_logging_stream = <_io.StringIO object at 0x7f21b2ccdb40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2c41f40> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:46.074 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden4/config/jupyter_server_config.json _ ERROR at setup of test_hidden_files[maybe_hidden2-jupyter_server.base.handlers.AuthenticatedFileHandler] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2c276a0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '1a7ef73a' environ = None http_port = 42863 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b30900e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42863 jp_logging_stream = <_io.StringIO object at 0x7f21b2ccc4c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2b4e850> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:46.173 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden5/config/jupyter_server_config.json _ ERROR at setup of test_hidden_files[maybe_hidden3-jupyter_server.files.handlers.FilesHandler] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3091620> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '90e2eb60' environ = None http_port = 42463 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3090b80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42463 jp_logging_stream = <_io.StringIO object at 0x7f21b2ccd9c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden6/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden6/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden6') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3094370> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:46.269 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden6/config/jupyter_server_config.json _ ERROR at setup of test_hidden_files[maybe_hidden3-jupyter_server.base.handlers.AuthenticatedFileHandler] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3090fe0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '62935bfd' environ = None http_port = 35875 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3090e00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35875 jp_logging_stream = <_io.StringIO object at 0x7f21b2ccdf00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden7/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden7/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3096440> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:46.366 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_hidden_files_maybe_hidden7/config/jupyter_server_config.json _ ERROR at setup of test_regression_is_hidden[jupyter_server.files.handlers.FilesHandler] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3093100> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '049a2384' environ = None http_port = 41211 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3093240> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41211 jp_logging_stream = <_io.StringIO object at 0x7f21b2cce680> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2dabf70> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:46.460 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy0/config/jupyter_server_config.json _ ERROR at setup of test_regression_is_hidden[jupyter_server.base.handlers.AuthenticatedFileHandler] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3093c40> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '695cc6f8' environ = None http_port = 33893 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3091ee0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33893 jp_logging_stream = <_io.StringIO object at 0x7f21b2ccebc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3094c30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:46.556 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jupy1/config/jupyter_server_config.json _ ERROR at setup of test_contents_manager[jupyter_server.files.handlers.FilesHandler] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3092660> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '4e8a04d0' environ = None http_port = 38669 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b30936a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38669 jp_logging_stream = <_io.StringIO object at 0x7f21b2ccf280> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3010af0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:46.661 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_0/config/jupyter_server_config.json _ ERROR at setup of test_contents_manager[jupyter_server.base.handlers.AuthenticatedFileHandler] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b30754e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'a8388f2c' environ = None http_port = 34419 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3074680> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34419 jp_logging_stream = <_io.StringIO object at 0x7f21b2ccf7c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b305ba20> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:46.758 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_contents_manager_jupyter_1/config/jupyter_server_config.json _ ERROR at setup of test_save_hooks[jupyter_server.files.handlers.FilesHandler] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3076160> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'c251b74d' environ = None http_port = 42831 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3074d60> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42831 jp_logging_stream = <_io.StringIO object at 0x7f21b3044e80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3011ea0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:46.858 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server0/config/jupyter_server_config.json _ ERROR at setup of test_save_hooks[jupyter_server.base.handlers.AuthenticatedFileHandler] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3076c00> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '7798b0a3' environ = None http_port = 37335 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3075800> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37335 jp_logging_stream = <_io.StringIO object at 0x7f21b3045540> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b305bcf0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:46.954 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_save_hooks_jupyter_server1/config/jupyter_server_config.json _ ERROR at setup of test_download[jupyter_server.files.handlers.FilesHandler] __ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3077880> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '6738dd70' environ = None http_port = 42031 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3076480> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42031 jp_logging_stream = <_io.StringIO object at 0x7f21b30453c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_f0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_f0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_f0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2fe3e80> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:47.049 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_f0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_f0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_f0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_f0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_f0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_f0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_f0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_f0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_f0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_f0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_f0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_f0/config/jupyter_server_config.json _ ERROR at setup of test_download[jupyter_server.base.handlers.AuthenticatedFileHandler] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3076d40> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '421e4988' environ = None http_port = 37563 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b30759e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37563 jp_logging_stream = <_io.StringIO object at 0x7f21b3045240> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_b0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_b0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_b0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2fe05f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:47.152 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_b0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_b0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_b0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_b0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_b0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_b0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_b0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_b0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_b0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_b0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_b0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_download_jupyter_server_b0/config/jupyter_server_config.json _ ERROR at setup of test_old_files_redirect[jupyter_server.files.handlers.FilesHandler] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2f3c0e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '058b6c57' environ = None http_port = 40417 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2f3c2c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40417 jp_logging_stream = <_io.StringIO object at 0x7f21b30459c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2f7edf0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:47.247 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.files.handlers.FilesHandler'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte0/config/jupyter_server_config.json _ ERROR at setup of test_old_files_redirect[jupyter_server.base.handlers.AuthenticatedFileHandler] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2f3d9e0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '374fdc21' environ = None http_port = 43283 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2f3c860> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43283 jp_logging_stream = <_io.StringIO object at 0x7f21b3045f00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ContentsManager.files_handler_class=jupyter_server.base.handlers.AuthenticatedFileHandler'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2fe0050> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:47.351 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'ContentsManager': {'files_handler_class': 'jupyter_server.base.handlers.AuthenticatedFileHandler'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_old_files_redirect_jupyte1/config/jupyter_server_config.json __________________ ERROR at setup of test_gateway_env_options __________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2f3e200> jp_server_config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '302dd64f' environ = None http_port = 42611 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2f3d1c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42611 jp_logging_stream = <_io.StringIO object at 0x7f21b3045fc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_env_options0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_env_options0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_env_options0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2f7dfe0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:47.446 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_gateway_env_options0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_env_options0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_env_options0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_env_options0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_env_options0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_env_options0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_env_options0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_env_options0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_env_options0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_env_options0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_env_options0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_env_options0/config/jupyter_server_config.json ________________ ERROR at setup of test_gateway_class_mappings _________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2b86340> jp_server_config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '2f92ed7f' environ = None http_port = 38455 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2b87740> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38455 jp_logging_stream = <_io.StringIO object at 0x7f21b2fa4640> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_class_mappings0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_class_mappings0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_class_mappings0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2bf5590> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:48.820 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_gateway_class_mappings0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_class_mappings0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_class_mappings0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_class_mappings0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_class_mappings0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_class_mappings0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_class_mappings0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_class_mappings0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_class_mappings0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_class_mappings0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_class_mappings0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_class_mappings0/config/jupyter_server_config.json ________________ ERROR at setup of test_gateway_get_kernelspecs ________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2b9c360> jp_server_config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '3232a310' environ = None http_port = 39581 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2b9c5e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39581 jp_logging_stream = <_io.StringIO object at 0x7f21b2fa62c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_kernelspecs0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_kernelspecs0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_kernelspecs0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2b1bf20> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:48.914 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_kernelspecs0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_kernelspecs0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_kernelspecs0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_kernelspecs0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_kernelspecs0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_kernelspecs0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_kernelspecs0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_kernelspecs0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_kernelspecs0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_kernelspecs0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_kernelspecs0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_kernelspecs0/config/jupyter_server_config.json _____________ ERROR at setup of test_gateway_get_named_kernelspec ______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2b9dd00> jp_server_config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '66625abd' environ = None http_port = 44833 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2b9cea0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44833 jp_logging_stream = <_io.StringIO object at 0x7f21b2fa5e40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_named_kernels0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_named_kernels0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_named_kernels0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2bf49b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:49.013 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_named_kernels0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_named_kernels0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_named_kernels0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_named_kernels0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_named_kernels0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_named_kernels0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_named_kernels0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_named_kernels0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_named_kernels0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_named_kernels0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_named_kernels0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_get_named_kernels0/config/jupyter_server_config.json ___________ ERROR at setup of test_gateway_session_lifecycle[False] ____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2b9e700> jp_server_config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'dfe8707c' environ = None http_port = 37723 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2b9d300> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37723 jp_logging_stream = <_io.StringIO object at 0x7f21b2fa4f40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2b7f200> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:49.104 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle0/config/jupyter_server_config.json ____________ ERROR at setup of test_gateway_session_lifecycle[True] ____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2b9ec00> jp_server_config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '94fe77ad' environ = None http_port = 39397 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2b9d620> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39397 jp_logging_stream = <_io.StringIO object at 0x7f21b2fa5240> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2bf7340> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:49.192 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle1/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle1/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_session_lifecycle1/config/jupyter_server_config.json ____________ ERROR at setup of test_gateway_kernel_lifecycle[False] ____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2b9fb00> jp_server_config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '65f87c28' environ = None http_port = 41665 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2b9dda0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41665 jp_logging_stream = <_io.StringIO object at 0x7f21b2fa6f80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2b7d4a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:49.289 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_0/config/jupyter_server_config.json ____________ ERROR at setup of test_gateway_kernel_lifecycle[True] _____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2b9de40> jp_server_config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '309fb81f' environ = None http_port = 40113 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2b9f240> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40113 jp_logging_stream = <_io.StringIO object at 0x7f21b2fa7580> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2bbbfc0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:49.381 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_1/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_1/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_kernel_lifecycle_1/config/jupyter_server_config.json ________________ ERROR at setup of test_gateway_shutdown[True] _________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2b9f4c0> jp_server_config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'b5fd67ba' environ = None http_port = 40807 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b31c8180> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40807 jp_logging_stream = <_io.StringIO object at 0x7f21b2b74940> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_True_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_True_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_True_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2bba210> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:49.477 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_True_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_True_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_True_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_True_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_True_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_True_0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_True_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_True_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_True_0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_True_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_True_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_True_0/config/jupyter_server_config.json ________________ ERROR at setup of test_gateway_shutdown[False] ________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b31c93a0> jp_server_config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'b2cb44b9' environ = None http_port = 35213 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b31c8a40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35213 jp_logging_stream = <_io.StringIO object at 0x7f21b2b74100> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_False_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_False_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_False_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b315ee90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:49.567 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_False_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_False_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_False_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_False_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_False_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_False_0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_False_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_False_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_False_0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_False_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_False_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_shutdown_False_0/config/jupyter_server_config.json _ ERROR at setup of test_kernel_client_response_router_notifies_channel_queue_when_finished _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b31ca200> jp_server_config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'bce8c894' environ = None http_port = 32893 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b31c8e00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 32893 jp_logging_stream = <_io.StringIO object at 0x7f21b2b75000> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_client_response_ro0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_kernel_client_response_ro0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_kernel_client_response_ro0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2bb96d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:49.922 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_kernel_client_response_ro0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_client_response_ro0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_kernel_client_response_ro0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_client_response_ro0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_client_response_ro0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_client_response_ro0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_client_response_ro0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_client_response_ro0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_kernel_client_response_ro0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_client_response_ro0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_client_response_ro0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_kernel_client_response_ro0/config/jupyter_server_config.json ______________ ERROR at setup of test_websocket_connection_closed ______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b31ca2a0> jp_server_config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'cfa2039b' environ = None http_port = 35773 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b31ca3e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35773 jp_logging_stream = <_io.StringIO object at 0x7f21b2b74880> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_clos0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_clos0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_clos0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b315dea0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:51.127 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_clos0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_clos0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_clos0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_clos0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_clos0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_clos0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_clos0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_clos0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_clos0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_clos0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_clos0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_clos0/config/jupyter_server_config.json _________ ERROR at setup of test_websocket_connection_with_session_id __________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b31cbf60> jp_server_config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '99e543e2' environ = None http_port = 45615 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b31cb2e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45615 jp_logging_stream = <_io.StringIO object at 0x7f21b2b74280> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_with0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_with0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_with0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3131180> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:51.221 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_with0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_with0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_with0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_with0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_with0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_with0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_with0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_with0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_with0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_with0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_with0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_websocket_connection_with0/config/jupyter_server_config.json _ ERROR at setup of test_trailing_slash[/notebooks/mynotebook/-/notebooks/mynotebook] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b31cbb00> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'd3f9995e' environ = None http_port = 36035 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3188180> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36035 jp_logging_stream = <_io.StringIO object at 0x7f21b2b759c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__notebooks0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__notebooks0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__notebooks0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b315e670> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:51.328 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__notebooks0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__notebooks0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__notebooks0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__notebooks0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__notebooks0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__notebooks0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__notebooks0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__notebooks0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__notebooks0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__notebooks0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__notebooks0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__notebooks0/config/jupyter_server_config.json ____________ ERROR at setup of test_trailing_slash[////foo///-/foo] ____________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3189760> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'f32641c8' environ = None http_port = 45469 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b31898a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45469 jp_logging_stream = <_io.StringIO object at 0x7f21b2b75fc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash_____foo___0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash_____foo___0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash_____foo___0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b258fe80> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:51.419 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash_____foo___0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash_____foo___0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash_____foo___0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash_____foo___0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash_____foo___0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash_____foo___0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash_____foo___0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash_____foo___0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash_____foo___0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash_____foo___0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash_____foo___0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash_____foo___0/config/jupyter_server_config.json ______ ERROR at setup of test_trailing_slash[//example.com/-/example.com] ______ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b318a200> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '7129c5bb' environ = None http_port = 43693 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3188e00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43693 jp_logging_stream = <_io.StringIO object at 0x7f21b2b765c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash___example_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash___example_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash___example_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3130eb0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:51.513 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash___example_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash___example_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash___example_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash___example_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash___example_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash___example_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash___example_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash___example_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash___example_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash___example_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash___example_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash___example_0/config/jupyter_server_config.json _ ERROR at setup of test_trailing_slash[/has/param/?hasparam=true-/has/param?hasparam=true] _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b318ab60> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'e39f6da0' environ = None http_port = 37123 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b3188ea0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37123 jp_logging_stream = <_io.StringIO object at 0x7f21b2b76bc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__has_param0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__has_param0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__has_param0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b258f2f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:51.603 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__has_param0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__has_param0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__has_param0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__has_param0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__has_param0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__has_param0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__has_param0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__has_param0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__has_param0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__has_param0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__has_param0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_trailing_slash__has_param0/config/jupyter_server_config.json _________________ ERROR at setup of test_list_running_servers __________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2957420> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '5261d632' environ = None http_port = 46791 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b29c4180> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46791 jp_logging_stream = <_io.StringIO object at 0x7f21b27fa2c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2917480> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:54.474 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers0/config/jupyter_server_config.json ________________ ERROR at setup of test_server_web_application _________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2843ba0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '07c25dc2' environ = None http_port = 45305 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b26f00e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45305 jp_logging_stream = <_io.StringIO object at 0x7f21b2821f00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_server_web_application0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_server_web_application0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_server_web_application0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2856e40> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:57.356 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_server_web_application0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_server_web_application0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_server_web_application0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_server_web_application0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_server_web_application0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_server_web_application0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_server_web_application0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_server_web_application0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_server_web_application0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_server_web_application0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_server_web_application0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_server_web_application0/config/jupyter_server_config.json _________________________ ERROR at setup of test_misc __________________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b26f1620> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '2b316c5a' environ = None http_port = 46435 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b26f1760> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46435 jp_logging_stream = <_io.StringIO object at 0x7f21b2823100> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_misc0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_misc0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_misc0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2856fd0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:57.782 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_misc0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_misc0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_misc0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_misc0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_misc0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_misc0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_misc0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_misc0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_misc0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_misc0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_misc0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_misc0/config/jupyter_server_config.json ___________________ ERROR at setup of test_deprecated_props ____________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b26f1f80> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '29eba961' environ = None http_port = 33575 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b26f0b80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33575 jp_logging_stream = <_io.StringIO object at 0x7f21b28213c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_props0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_props0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_props0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2856df0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:57.876 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_props0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_props0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_props0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_props0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_props0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_props0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_props0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_props0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_props0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_props0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_props0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_props0/config/jupyter_server_config.json ________________________ ERROR at setup of test_signals ________________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b26f2840> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'a2d25f45' environ = None http_port = 37607 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b26f0ea0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37607 jp_logging_stream = <_io.StringIO object at 0x7f21b2820640> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_signals0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_signals0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_signals0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b25ff840> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:57.975 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_signals0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_signals0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_signals0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_signals0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_signals0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_signals0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_signals0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_signals0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_signals0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_signals0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_signals0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_signals0/config/jupyter_server_config.json _________________ ERROR at setup of test_shutdown_no_activity __________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b26f3100> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '82ccd8a3' environ = None http_port = 34055 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b26f16c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34055 jp_logging_stream = <_io.StringIO object at 0x7f21b264cd00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_shutdown_no_activity0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_shutdown_no_activity0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_shutdown_no_activity0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2814e10> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:58.066 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_shutdown_no_activity0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_shutdown_no_activity0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_shutdown_no_activity0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_shutdown_no_activity0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_shutdown_no_activity0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_shutdown_no_activity0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_shutdown_no_activity0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_shutdown_no_activity0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_shutdown_no_activity0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_shutdown_no_activity0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_shutdown_no_activity0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_shutdown_no_activity0/config/jupyter_server_config.json __________________ ERROR at setup of test_running_server_info __________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b26f39c0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '07ac4893' environ = None http_port = 33133 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b26f2020> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33133 jp_logging_stream = <_io.StringIO object at 0x7f21b264d3c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_running_server_info0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_running_server_info0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_running_server_info0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b25fc370> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:58.160 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_running_server_info0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_running_server_info0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_running_server_info0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_running_server_info0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_running_server_info0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_running_server_info0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_running_server_info0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_running_server_info0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_running_server_info0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_running_server_info0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_running_server_info0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_running_server_info0/config/jupyter_server_config.json _____________________ ERROR at setup of test_no_terminals ______________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b26de200> jp_server_config = {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'f4947e3e' environ = None http_port = 45139 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b26de480> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45139 jp_logging_stream = <_io.StringIO object at 0x7f21b264dfc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_no_terminals0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_no_terminals0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_no_terminals0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b26b7b60> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:58.556 ServerApp] Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_no_terminals0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_no_terminals0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_no_terminals0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_terminals0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_terminals0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_terminals0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_terminals0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_terminals0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_no_terminals0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_no_terminals0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_no_terminals0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_no_terminals0/config/jupyter_server_config.json ____________________ ERROR at setup of test_terminal_create ____________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b26df600> jp_server_config = {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'cbc57c07' environ = None http_port = 33833 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b26df920> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33833 jp_logging_stream = <_io.StringIO object at 0x7f21b264e8c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_terminal_create0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_terminal_create0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_terminal_create0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b26870c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:58.651 ServerApp] Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_terminal_create0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_terminal_create0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_terminal_create0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create0/config/jupyter_server_config.json ______________ ERROR at setup of test_terminal_create_with_kwargs ______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b26deb60> jp_server_config = {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'fabdfafb' environ = None http_port = 34407 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b26ddd00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34407 jp_logging_stream = <_io.StringIO object at 0x7f21b264d0c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_kwar0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_kwar0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_kwar0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b26b4be0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:58.743 ServerApp] Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_kwar0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_kwar0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_kwar0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_kwar0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_kwar0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_kwar0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_kwar0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_kwar0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_kwar0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_kwar0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_kwar0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_kwar0/config/jupyter_server_config.json _______________ ERROR at setup of test_terminal_create_with_cwd ________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b26de980> jp_server_config = {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '2cc77fd6' environ = None http_port = 33803 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b26df9c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33803 jp_logging_stream = <_io.StringIO object at 0x7f21b264d600> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_cwd0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_cwd0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_cwd0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b28a43c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:58.832 ServerApp] Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_cwd0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_cwd0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_cwd0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_cwd0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_cwd0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_cwd0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_cwd0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_cwd0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_cwd0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_cwd0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_cwd0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_terminal_create_with_cwd0/config/jupyter_server_config.json ________________________ ERROR at setup of test_culling ________________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b24a31a0> jp_server_config = {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '01a010c3' environ = None http_port = 41201 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b24a3560> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41201 jp_logging_stream = <_io.StringIO object at 0x7f21b2431900> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_culling1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_culling1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_culling1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b243f390> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:59.117 ServerApp] Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_culling0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_culling0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_culling0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_culling0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_culling0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_culling0/config/jupyter_server_config.json ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:59.209 ServerApp] Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_culling1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_culling1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_culling1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_culling1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_culling1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_culling1/config/jupyter_server_config.json ______________ ERROR at setup of test_view[False-nosuchfile.html] ______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2345800> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '42cb8e6e' environ = None http_port = 43987 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b23459e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43987 jp_logging_stream = <_io.StringIO object at 0x7f21b2432380> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_htm0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_htm0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_htm0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b235bfc0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:42:59.996 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_htm0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_htm0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_htm0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_htm0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_htm0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_htm0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_htm0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_htm0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_htm0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_htm0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_htm0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_htm0/config/jupyter_server_config.json ______________ ERROR at setup of test_view[False-nosuchfile.bin] _______________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21c01a3ba0> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '8b69cf89' environ = None http_port = 36023 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21c01a37e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36023 jp_logging_stream = <_io.StringIO object at 0x7f21b2433040> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_bin0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_bin0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_bin0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b23ebb10> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:43:00.409 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_bin0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_bin0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_bin0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_bin0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_bin0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_bin0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_bin0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_bin0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_bin0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_bin0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_bin0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_view_False_nosuchfile_bin0/config/jupyter_server_config.json ________________ ERROR at setup of test_view[True-exists.html] _________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21c01a3920> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '9d5cd8e5' environ = None http_port = 40399 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bef44040> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40399 jp_logging_stream = <_io.StringIO object at 0x7f21b2430700> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_html_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_html_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_html_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b23e8eb0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:43:00.501 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_html_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_html_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_html_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_html_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_html_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_html_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_html_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_html_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_html_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_html_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_html_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_html_0/config/jupyter_server_config.json _________________ ERROR at setup of test_view[True-exists.bin] _________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2346480> jp_server_config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '5f461ec4' environ = None http_port = 38415 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b23453a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38415 jp_logging_stream = <_io.StringIO object at 0x7f21b2430dc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_bin_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_bin_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_bin_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2358d20> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:43:00.597 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_bin_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_bin_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_bin_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_bin_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_bin_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_bin_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_bin_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_bin_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_bin_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_bin_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_bin_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_view_True_exists_bin_0/config/jupyter_server_config.json _______________________ ERROR at setup of test_get_spec ________________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2346c00> jp_server_config = {'ServerApp': {'allow_remote_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'sock': '/tmp/jupyter_server.1338.sock'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'allow_remote_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'sock': '/tmp/jupyter_server.1338.sock'}} config = {'ServerApp': {'allow_remote_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'sock': '/tmp/jupyter_server.1338.sock'}} default_token = '55d8a983' environ = None http_port = 8888 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2344720> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 8888 jp_logging_stream = <_io.StringIO object at 0x7f21b2430c40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_get_spec1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_spec1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_get_spec1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21c018aee0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:43:00.690 ServerApp] Config changed: {'ServerApp': {'sock': '/tmp/jupyter_server.1338.sock', 'allow_remote_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'sock': '/tmp/jupyter_server.1338.sock', 'allow_remote_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_get_spec1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_spec1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_get_spec1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_spec1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_spec1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_spec1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'sock': '/tmp/jupyter_server.1338.sock', 'allow_remote_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_spec1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_spec1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_get_spec1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'sock': '/tmp/jupyter_server.1338.sock', 'allow_remote_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'sock': '/tmp/jupyter_server.1338.sock', 'allow_remote_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_spec1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_spec1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_get_spec1/config/jupyter_server_config.json _________________ ERROR at setup of test_list_running_servers __________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ihook = item = kwds = {} /usr/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:236: in jp_serverapp return jp_configurable_serverapp(config=jp_server_config, argv=jp_argv) jp_argv = [] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2345f80> jp_server_config = {'ServerApp': {'allow_remote_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'sock': '/tmp/jupyter_server.1338.sock'}} /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'allow_remote_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'sock': '/tmp/jupyter_server.1338.sock'}} config = {'ServerApp': {'allow_remote_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'sock': '/tmp/jupyter_server.1338.sock'}} default_token = 'f281c668' environ = None http_port = 8888 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2345a80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 8888 jp_logging_stream = <_io.StringIO object at 0x7f21b2433d00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b235b070> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ---------------------------- Captured stderr setup ----------------------------- [D 2024-12-18 10:43:00.781 ServerApp] Config changed: {'ServerApp': {'sock': '/tmp/jupyter_server.1338.sock', 'allow_remote_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log setup ------------------------------ DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'sock': '/tmp/jupyter_server.1338.sock', 'allow_remote_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'sock': '/tmp/jupyter_server.1338.sock', 'allow_remote_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'sock': '/tmp/jupyter_server.1338.sock', 'allow_remote_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'sock': '/tmp/jupyter_server.1338.sock', 'allow_remote_access': True, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_list_running_servers1/config/jupyter_server_config.json =================================== FAILURES =================================== ____________________________ test_deprecated_config ____________________________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc2ce840> def test_deprecated_config(jp_configurable_serverapp): cfg = Config() cfg.ServerApp.token = token = "asdf" cfg.ServerApp.password = password = passwd("secrets") > app = jp_configurable_serverapp(config=cfg) cfg = {'ServerApp': {'password': 'argon2:$argon2id$v=19$m=10240,t=10,p=8$FZWGgKA+EJyjG6DVKGbrXg$/4d8PLYDkd0w1I0Zb5EXgwy5mULNeNiRFWyOCe8oz6Y', 'token': 'asdf'}} jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc2ce840> password = 'argon2:$argon2id$v=19$m=10240,t=10,p=8$FZWGgKA+EJyjG6DVKGbrXg$/4d8PLYDkd0w1I0Zb5EXgwy5mULNeNiRFWyOCe8oz6Y' token = 'asdf' tests/auth/test_legacy_login.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': 'asdf'}, 'NotebookNotary': {'db_file': ':memory:'}, 'PasswordIdentityProvider': {'hashed_password': 'argon2:$argon2id$v=19$m=10240,t=10,p=8$FZWGgKA+EJyjG6DVKGbrXg$/4d8PLYDkd0w1I0Zb5EXgwy5mULNeNiRFWyOCe8oz6Y'}, 'ServerApp': {'password': 'argon2:$argon2id$v=19$m=10240,t=10,p=8$FZWGgKA+EJyjG6DVKGbrXg$/4d8PLYDkd0w1I0Zb5EXgwy5mULNeNiRFWyOCe8oz6Y', 'token': 'asdf'}} config = {'ServerApp': {'password': 'argon2:$argon2id$v=19$m=10240,t=10,p=8$FZWGgKA+EJyjG6DVKGbrXg$/4d8PLYDkd0w1I0Zb5EXgwy5mULNeNiRFWyOCe8oz6Y', 'token': 'asdf'}} default_token = 'f65fad7a' environ = None http_port = 43251 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc2cf7e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43251 jp_logging_stream = <_io.StringIO object at 0x7f21bc6cdfc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc226fd0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [W 2024-12-18 10:41:25.556 ServerApp] ServerApp.token config is deprecated in 2.0. Use IdentityProvider.token. [W 2024-12-18 10:41:25.556 ServerApp] ServerApp.password config is deprecated in 2.0. Use PasswordIdentityProvider.hashed_password. [D 2024-12-18 10:41:25.556 ServerApp] Config changed: {'ServerApp': {'token': 'asdf', 'password': 'argon2:$argon2id$v=19$m=10240,t=10,p=8$FZWGgKA+EJyjG6DVKGbrXg$/4d8PLYDkd0w1I0Zb5EXgwy5mULNeNiRFWyOCe8oz6Y'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': 'asdf'}, 'PasswordIdentityProvider': {'hashed_password': 'argon2:$argon2id$v=19$m=10240,t=10,p=8$FZWGgKA+EJyjG6DVKGbrXg$/4d8PLYDkd0w1I0Zb5EXgwy5mULNeNiRFWyOCe8oz6Y'}} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config0/config DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config0/config DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config0/config/jupyter_server_config.json _______________________ test_deprecated_config_priority ________________________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc295300> def test_deprecated_config_priority(jp_configurable_serverapp): cfg = Config() cfg.ServerApp.token = "ignored" cfg.IdentityProvider.token = token = "idp_token" cfg.ServerApp.password = passwd("ignored") cfg.PasswordIdentityProvider.hashed_password = password = passwd("used") > app = jp_configurable_serverapp(config=cfg) cfg = {'IdentityProvider': {'token': 'idp_token'}, 'PasswordIdentityProvider': {'hashed_password': 'argon2:$argon2id$v=19$m=10240,t=10,p=8$NaPH0PIQ1Ck6mTD3iL8gmw$4KVsW0Ch3uWr9mlqsJs+bKG46BzhZa+NYj+G/tiVnyw'}, 'ServerApp': {'password': 'argon2:$argon2id$v=19$m=10240,t=10,p=8$Eq26PLDPe4DyX2rhF7uZ2A$0JVnmHDzXFrvczTQaMHeRitnq2PAQUKIZuRrEhNmokk', 'token': 'ignored'}} jp_configurable_serverapp = ._configurable_serverapp at 0x7f21bc295300> password = 'argon2:$argon2id$v=19$m=10240,t=10,p=8$NaPH0PIQ1Ck6mTD3iL8gmw$4KVsW0Ch3uWr9mlqsJs+bKG46BzhZa+NYj+G/tiVnyw' token = 'idp_token' tests/auth/test_legacy_login.py:106: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': 'idp_token'}, 'NotebookNotary': {'db_file': ':memory:'}, 'PasswordIdentityProvider': {'hashed_password': 'argon2:$argon2id$v=19$m=10240,t=10,p=8$NaPH0PIQ1Ck6mTD3iL8gmw$4KVsW0Ch3uWr9mlqsJs+bKG46BzhZa+NYj+G/tiVnyw'}, 'ServerApp': {'password': 'argon2:$argon2id$v=19$m=10240,t=10,p=8$Eq26PLDPe4DyX2rhF7uZ2A$0JVnmHDzXFrvczTQaMHeRitnq2PAQUKIZuRrEhNmokk', 'token': 'ignored'}} config = {'IdentityProvider': {'token': 'idp_token'}, 'PasswordIdentityProvider': {'hashed_password': 'argon2:$argon2id$v=19$m=10240,t=10,p=8$NaPH0PIQ1Ck6mTD3iL8gmw$4KVsW0Ch3uWr9mlqsJs+bKG46BzhZa+NYj+G/tiVnyw'}, 'ServerApp': {'password': 'argon2:$argon2id$v=19$m=10240,t=10,p=8$Eq26PLDPe4DyX2rhF7uZ2A$0JVnmHDzXFrvczTQaMHeRitnq2PAQUKIZuRrEhNmokk', 'token': 'ignored'}} default_token = '2af54bef' environ = None http_port = 44351 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21bc2949a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44351 jp_logging_stream = <_io.StringIO object at 0x7f21bc6ccb80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config_priorit0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config_priorit0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config_priorit0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc2b0460> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [W 2024-12-18 10:41:25.709 ServerApp] Ignoring deprecated ServerApp.token config. Using IdentityProvider.token. [W 2024-12-18 10:41:25.709 ServerApp] Ignoring deprecated ServerApp.password config. Using PasswordIdentityProvider.hashed_password. [D 2024-12-18 10:41:25.709 ServerApp] Config changed: {'ServerApp': {'token': 'ignored', 'password': 'argon2:$argon2id$v=19$m=10240,t=10,p=8$Eq26PLDPe4DyX2rhF7uZ2A$0JVnmHDzXFrvczTQaMHeRitnq2PAQUKIZuRrEhNmokk'}, 'IdentityProvider': {'token': 'idp_token'}, 'PasswordIdentityProvider': {'hashed_password': 'argon2:$argon2id$v=19$m=10240,t=10,p=8$NaPH0PIQ1Ck6mTD3iL8gmw$4KVsW0Ch3uWr9mlqsJs+bKG46BzhZa+NYj+G/tiVnyw'}, 'NotebookNotary': {'db_file': ':memory:'}} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config_priorit0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config_priorit0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config_priorit0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config_priorit0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config_priorit0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config_priorit0/config DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config_priorit0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config_priorit0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config_priorit0/config DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config_priorit0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config_priorit0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_config_priorit0/config/jupyter_server_config.json _______________________ test_browser_open[True-config0] ________________________ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21bc6c8600> jp_environ = None, config = {}, expected_value = True @pytest.mark.parametrize("expected_value, config", OPEN_BROWSER_COMBINATIONS) async def test_browser_open(monkeypatch, jp_environ, config, expected_value): with mock.patch("jupyter_server.serverapp.ServerApp.init_httpserver"): > serverapp = MockExtensionApp.initialize_server(config=Config(config)) config = {} expected_value = True jp_environ = None monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21bc6c8600> tests/extension/test_app.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/extension/application.py:586: in initialize_server serverapp.initialize( argv = None cls = find_extensions = False jpserver_extensions = {'tests.extension.mockextensions': True, 'tests.extension.mockextensions.mock1': True} kwargs = {'config': {}} load_other_extensions = True serverapp = /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'find_extensions': False, 'starter_extension': 'mockextension'} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = False new_httpserver = True self = starter_extension = 'mockextension' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7bb3610> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________________ test_browser_open[True-config1] ________________________ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21bc667850> jp_environ = None, config = {'ServerApp': {'open_browser': True}} expected_value = True @pytest.mark.parametrize("expected_value, config", OPEN_BROWSER_COMBINATIONS) async def test_browser_open(monkeypatch, jp_environ, config, expected_value): with mock.patch("jupyter_server.serverapp.ServerApp.init_httpserver"): > serverapp = MockExtensionApp.initialize_server(config=Config(config)) config = {'ServerApp': {'open_browser': True}} expected_value = True jp_environ = None monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21bc667850> tests/extension/test_app.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/extension/application.py:586: in initialize_server serverapp.initialize( argv = None cls = find_extensions = False jpserver_extensions = {'tests.extension.mockextensions': True, 'tests.extension.mockextensions.mock1': True} kwargs = {'config': {'ServerApp': {'open_browser': True}}} load_other_extensions = True serverapp = /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'find_extensions': False, 'starter_extension': 'mockextension'} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = False new_httpserver = True self = starter_extension = 'mockextension' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7bb0c30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________________ test_browser_open[False-config2] _______________________ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21bc6cb000> jp_environ = None, config = {'ServerApp': {'open_browser': False}} expected_value = False @pytest.mark.parametrize("expected_value, config", OPEN_BROWSER_COMBINATIONS) async def test_browser_open(monkeypatch, jp_environ, config, expected_value): with mock.patch("jupyter_server.serverapp.ServerApp.init_httpserver"): > serverapp = MockExtensionApp.initialize_server(config=Config(config)) config = {'ServerApp': {'open_browser': False}} expected_value = False jp_environ = None monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21bc6cb000> tests/extension/test_app.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/extension/application.py:586: in initialize_server serverapp.initialize( argv = None cls = find_extensions = False jpserver_extensions = {'tests.extension.mockextensions': True, 'tests.extension.mockextensions.mock1': True} kwargs = {'config': {'ServerApp': {'open_browser': False}}} load_other_extensions = True serverapp = /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'find_extensions': False, 'starter_extension': 'mockextension'} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = False new_httpserver = True self = starter_extension = 'mockextension' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc633b10> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________________ test_browser_open[True-config3] ________________________ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21bc6aa5f0> jp_environ = None, config = {'MockExtensionApp': {'open_browser': True}} expected_value = True @pytest.mark.parametrize("expected_value, config", OPEN_BROWSER_COMBINATIONS) async def test_browser_open(monkeypatch, jp_environ, config, expected_value): with mock.patch("jupyter_server.serverapp.ServerApp.init_httpserver"): > serverapp = MockExtensionApp.initialize_server(config=Config(config)) config = {'MockExtensionApp': {'open_browser': True}} expected_value = True jp_environ = None monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21bc6aa5f0> tests/extension/test_app.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/extension/application.py:586: in initialize_server serverapp.initialize( argv = None cls = find_extensions = False jpserver_extensions = {'tests.extension.mockextensions': True, 'tests.extension.mockextensions.mock1': True} kwargs = {'config': {'MockExtensionApp': {'open_browser': True}}} load_other_extensions = True serverapp = /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'find_extensions': False, 'starter_extension': 'mockextension'} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = False new_httpserver = True self = starter_extension = 'mockextension' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc6324e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________________ test_browser_open[False-config4] _______________________ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21bc6abc40> jp_environ = None, config = {'MockExtensionApp': {'open_browser': False}} expected_value = False @pytest.mark.parametrize("expected_value, config", OPEN_BROWSER_COMBINATIONS) async def test_browser_open(monkeypatch, jp_environ, config, expected_value): with mock.patch("jupyter_server.serverapp.ServerApp.init_httpserver"): > serverapp = MockExtensionApp.initialize_server(config=Config(config)) config = {'MockExtensionApp': {'open_browser': False}} expected_value = False jp_environ = None monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21bc6abc40> tests/extension/test_app.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/extension/application.py:586: in initialize_server serverapp.initialize( argv = None cls = find_extensions = False jpserver_extensions = {'tests.extension.mockextensions': True, 'tests.extension.mockextensions.mock1': True} kwargs = {'config': {'MockExtensionApp': {'open_browser': False}}} load_other_extensions = True serverapp = /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'find_extensions': False, 'starter_extension': 'mockextension'} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = False new_httpserver = True self = starter_extension = 'mockextension' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc6307d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________________ test_browser_open[True-config5] ________________________ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21bc6aac10> jp_environ = None config = {'MockExtensionApp': {'open_browser': True}, 'ServerApp': {'open_browser': True}} expected_value = True @pytest.mark.parametrize("expected_value, config", OPEN_BROWSER_COMBINATIONS) async def test_browser_open(monkeypatch, jp_environ, config, expected_value): with mock.patch("jupyter_server.serverapp.ServerApp.init_httpserver"): > serverapp = MockExtensionApp.initialize_server(config=Config(config)) config = {'MockExtensionApp': {'open_browser': True}, 'ServerApp': {'open_browser': True}} expected_value = True jp_environ = None monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21bc6aac10> tests/extension/test_app.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/extension/application.py:586: in initialize_server serverapp.initialize( argv = None cls = find_extensions = False jpserver_extensions = {'tests.extension.mockextensions': True, 'tests.extension.mockextensions.mock1': True} kwargs = {'config': {'MockExtensionApp': {'open_browser': True}, 'ServerApp': {'open_browser': True}}} load_other_extensions = True serverapp = /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'find_extensions': False, 'starter_extension': 'mockextension'} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = False new_httpserver = True self = starter_extension = 'mockextension' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc632940> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________________ test_browser_open[False-config6] _______________________ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b7f7d6a0> jp_environ = None config = {'MockExtensionApp': {'open_browser': False}, 'ServerApp': {'open_browser': True}} expected_value = False @pytest.mark.parametrize("expected_value, config", OPEN_BROWSER_COMBINATIONS) async def test_browser_open(monkeypatch, jp_environ, config, expected_value): with mock.patch("jupyter_server.serverapp.ServerApp.init_httpserver"): > serverapp = MockExtensionApp.initialize_server(config=Config(config)) config = {'MockExtensionApp': {'open_browser': False}, 'ServerApp': {'open_browser': True}} expected_value = False jp_environ = None monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b7f7d6a0> tests/extension/test_app.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/extension/application.py:586: in initialize_server serverapp.initialize( argv = None cls = find_extensions = False jpserver_extensions = {'tests.extension.mockextensions': True, 'tests.extension.mockextensions.mock1': True} kwargs = {'config': {'MockExtensionApp': {'open_browser': False}, 'ServerApp': {'open_browser': True}}} load_other_extensions = True serverapp = /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'find_extensions': False, 'starter_extension': 'mockextension'} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = False new_httpserver = True self = starter_extension = 'mockextension' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21bc630640> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________________ test_browser_open[True-config7] ________________________ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b7f7fa10> jp_environ = None config = {'MockExtensionApp': {'open_browser': True}, 'ServerApp': {'open_browser': False}} expected_value = True @pytest.mark.parametrize("expected_value, config", OPEN_BROWSER_COMBINATIONS) async def test_browser_open(monkeypatch, jp_environ, config, expected_value): with mock.patch("jupyter_server.serverapp.ServerApp.init_httpserver"): > serverapp = MockExtensionApp.initialize_server(config=Config(config)) config = {'MockExtensionApp': {'open_browser': True}, 'ServerApp': {'open_browser': False}} expected_value = True jp_environ = None monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b7f7fa10> tests/extension/test_app.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/extension/application.py:586: in initialize_server serverapp.initialize( argv = None cls = find_extensions = False jpserver_extensions = {'tests.extension.mockextensions': True, 'tests.extension.mockextensions.mock1': True} kwargs = {'config': {'MockExtensionApp': {'open_browser': True}, 'ServerApp': {'open_browser': False}}} load_other_extensions = True serverapp = /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'find_extensions': False, 'starter_extension': 'mockextension'} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = False new_httpserver = True self = starter_extension = 'mockextension' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7f43ca0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________________ test_browser_open[False-config8] _______________________ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b7f7e740> jp_environ = None config = {'MockExtensionApp': {'open_browser': False}, 'ServerApp': {'open_browser': False}} expected_value = False @pytest.mark.parametrize("expected_value, config", OPEN_BROWSER_COMBINATIONS) async def test_browser_open(monkeypatch, jp_environ, config, expected_value): with mock.patch("jupyter_server.serverapp.ServerApp.init_httpserver"): > serverapp = MockExtensionApp.initialize_server(config=Config(config)) config = {'MockExtensionApp': {'open_browser': False}, 'ServerApp': {'open_browser': False}} expected_value = False jp_environ = None monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b7f7e740> tests/extension/test_app.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/extension/application.py:586: in initialize_server serverapp.initialize( argv = None cls = find_extensions = False jpserver_extensions = {'tests.extension.mockextensions': True, 'tests.extension.mockextensions.mock1': True} kwargs = {'config': {'MockExtensionApp': {'open_browser': False}, 'ServerApp': {'open_browser': False}}} load_other_extensions = True serverapp = /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'find_extensions': False, 'starter_extension': 'mockextension'} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = False new_httpserver = True self = starter_extension = 'mockextension' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7f41ea0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ________________________ test_load_parallel_extensions _________________________ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b7f3dc50> jp_environ = None async def test_load_parallel_extensions(monkeypatch, jp_environ): with mock.patch("jupyter_server.serverapp.ServerApp.init_httpserver"): > serverapp = MockExtensionApp.initialize_server() jp_environ = None monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b7f3dc50> tests/extension/test_app.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/extension/application.py:586: in initialize_server serverapp.initialize( argv = None cls = find_extensions = False jpserver_extensions = {'tests.extension.mockextensions': True, 'tests.extension.mockextensions.mock1': True} kwargs = {} load_other_extensions = True serverapp = /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'find_extensions': False, 'starter_extension': 'mockextension'} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = False new_httpserver = True self = starter_extension = 'mockextension' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7f42d00> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________ test_serverapp_warns_of_unauthenticated_handler ________________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7fcfec0> def test_serverapp_warns_of_unauthenticated_handler(jp_configurable_serverapp): # should warn about the handler missing decorator when unauthenticated access forbidden expected_warning = "Extension endpoints without @allow_unauthenticated, @ws_authenticated, nor @web.authenticated:" > with pytest.warns(RuntimeWarning, match=expected_warning) as record: E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 expected_warning = ('Extension endpoints without @allow_unauthenticated, @ws_authenticated, nor ' '@web.authenticated:') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7fcfec0> record = WarningsChecker(record=True) tests/extension/test_handler.py:53: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:41:32.584 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_serverapp_warns_of_unauth0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_serverapp_warns_of_unauth0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_serverapp_warns_of_unauth0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_serverapp_warns_of_unauth0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_serverapp_warns_of_unauth0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_serverapp_warns_of_unauth0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_serverapp_warns_of_unauth0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_serverapp_warns_of_unauth0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_serverapp_warns_of_unauth0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_serverapp_warns_of_unauth0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_serverapp_warns_of_unauth0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_serverapp_warns_of_unauth0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_serverapp_warns_of_unauth0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions': True, 'jupyter_server_terminals': True}}, 'MockExtensionApp': {'template_paths': ['/tmp/pytest-of-mockbuild/pytest-0/test_serverapp_warns_of_unauth0/templates']}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_serverapp_warns_of_unauth0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_serverapp_warns_of_unauth0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_serverapp_warns_of_unauth0/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3005 Serving notebooks from local directory: /tmp/pytest-of-mockbuild/pytest-0/test_serverapp_warns_of_unauth0/root_dir INFO ServerApp:serverapp.py:3005 Jupyter Server 2.14.2 is running at: INFO ServerApp:serverapp.py:3005 http://localhost:42229/a%40b/?token=0c820af19e62ed9466d712044fdb73391518e27394afb145 INFO ServerApp:serverapp.py:3005 http://127.0.0.1:42229/a%40b/?token=0c820af19e62ed9466d712044fdb73391518e27394afb145 INFO ServerApp:serverapp.py:3006 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3068 To access the server, open this file in a browser: file:///tmp/pytest-of-mockbuild/pytest-0/test_serverapp_warns_of_unauth0/runtime/jpserver-1338-open.html Or copy and paste one of these URLs: http://localhost:42229/a%40b/?token=0c820af19e62ed9466d712044fdb73391518e27394afb145 http://127.0.0.1:42229/a%40b/?token=0c820af19e62ed9466d712044fdb73391518e27394afb145 ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2788 Shutting down 2 extensions DEBUG ServerApp:manager.py:373 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:375 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped DEBUG ServerApp:manager.py:373 tests.extension.mockextensions | extension app 'mockextension' stopping DEBUG ServerApp:manager.py:375 tests.extension.mockextensions | extension app 'mockextension' stopped ______________________________ test_merge_config _______________________________ jp_env_config_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_merge_config0/env/etc/jupyter') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7b6e5c0> jp_extension_environ = None @pytest.mark.skipif(prefer_environment_over_user is None, reason="Requires jupyter_core 5.0+") def test_merge_config(jp_env_config_path, jp_configurable_serverapp, jp_extension_environ): # Toggle each extension module with a JSON config file # at the sys-prefix config dir. toggle_server_extension_python( "tests.extension.mockextensions.mockext_sys", enabled=True, sys_prefix=True, ) toggle_server_extension_python( "tests.extension.mockextensions.mockext_user", enabled=True, user=True, ) # Write this configuration in two places, sys-prefix and user. # sys-prefix supersedes users, so the extension should be disabled # when these two configs merge. toggle_server_extension_python( "tests.extension.mockextensions.mockext_both", enabled=False, sys_prefix=True, ) toggle_server_extension_python( "tests.extension.mockextensions.mockext_both", enabled=True, user=True, ) mockext_py = "tests.extension.mockextensions.mockext_py" argv = ["--ServerApp.jpserver_extensions", f"{mockext_py}=True"] # Enable the last extension, mockext_py, using the CLI interface. > app = jp_configurable_serverapp(config_dir=str(jp_env_config_path), argv=argv) argv = ['--ServerApp.jpserver_extensions', 'tests.extension.mockextensions.mockext_py=True'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7b6e5c0> jp_env_config_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_merge_config0/env/etc/jupyter') jp_extension_environ = None mockext_py = 'tests.extension.mockextensions.mockext_py' tests/extension/test_serverextension.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.jpserver_extensions', 'tests.extension.mockextensions.mockext_py=True'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '635c1fff' environ = None http_port = 36887 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7b6e700> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36887 jp_logging_stream = <_io.StringIO object at 0x7f21b7e08f40> kwargs = {'config_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_merge_config0/env/etc/jupyter', 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_merge_config0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_merge_config0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_merge_config0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.jpserver_extensions', 'tests.extension.mockextensions.mockext_py=True'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.jpserver_extensions', 'tests.extension.mockextensions.mockext_py=True'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.jpserver_extensions', 'tests.extension.mockextensions.mockext_py=True'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7b67110> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:41:35.988 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_merge_config0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_merge_config0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_merge_config0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_merge_config0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_merge_config0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_merge_config0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions.mockext_py': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_merge_config0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_merge_config0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_merge_config0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions.mockext_py': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'tests.extension.mockextensions.mockext_py': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_merge_config0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_merge_config0/env/etc/jupyter/jupyter_server_config.d/tests.extension.mockextensions.mockext_both.json /tmp/pytest-of-mockbuild/pytest-0/test_merge_config0/env/etc/jupyter/jupyter_server_config.d/tests.extension.mockextensions.mockext_sys.json /tmp/pytest-of-mockbuild/pytest-0/test_merge_config0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_merge_config0/config/jupyter_server_config.d/tests.extension.mockextensions.mockext_both.json /tmp/pytest-of-mockbuild/pytest-0/test_merge_config0/config/jupyter_server_config.d/tests.extension.mockextensions.mockext_user.json /tmp/pytest-of-mockbuild/pytest-0/test_merge_config0/config/jupyter_server_config.json ___________ test_async_contents_manager[AsyncGenericFileCheckpoints] ___________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4377880> def test_async_contents_manager(jp_configurable_serverapp): config = {"ContentsManager": {"checkpoints_class": AsyncCheckpoints}} argv = [ "--ServerApp.contents_manager_class=jupyter_server.services.contents.manager.AsyncContentsManager" ] > app = jp_configurable_serverapp(config=config, argv=argv) argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.manager.AsyncContentsManager'] config = {'ContentsManager': {'checkpoints_class': }} jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b4377880> tests/services/contents/test_config.py:52: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.manager.AsyncContentsManager'] base_url = '/a%40b/' c = {'ContentsManager': {'checkpoints_class': }, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {}} config = {'ContentsManager': {'checkpoints_class': }} default_token = 'fbb54fde' environ = None http_port = 44801 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b4375bc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44801 jp_logging_stream = <_io.StringIO object at 0x7f21b43e5600> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.manager.AsyncContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.manager.AsyncContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.manager.AsyncContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b434fe30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:09.710 ServerApp] Config changed: {'ContentsManager': {'checkpoints_class': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ContentsManager': {'checkpoints_class': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As0/config DEBUG ServerApp:application.py:457 Config changed: {'ContentsManager': {'checkpoints_class': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'contents_manager_class': 'jupyter_server.services.contents.manager.AsyncContentsManager'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As0/config DEBUG ServerApp:application.py:457 Config changed: {'ContentsManager': {'checkpoints_class': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'contents_manager_class': 'jupyter_server.services.contents.manager.AsyncContentsManager'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ContentsManager': {'checkpoints_class': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'contents_manager_class': 'jupyter_server.services.contents.manager.AsyncContentsManager'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As0/config/jupyter_server_config.json ______________ test_async_contents_manager[AsyncFileCheckpoints] _______________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b43765c0> def test_async_contents_manager(jp_configurable_serverapp): config = {"ContentsManager": {"checkpoints_class": AsyncCheckpoints}} argv = [ "--ServerApp.contents_manager_class=jupyter_server.services.contents.manager.AsyncContentsManager" ] > app = jp_configurable_serverapp(config=config, argv=argv) argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.manager.AsyncContentsManager'] config = {'ContentsManager': {'checkpoints_class': }} jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b43765c0> tests/services/contents/test_config.py:52: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.manager.AsyncContentsManager'] base_url = '/a%40b/' c = {'ContentsManager': {'checkpoints_class': }, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {}} config = {'ContentsManager': {'checkpoints_class': }} default_token = '672174d3' environ = None http_port = 36361 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b43772e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36361 jp_logging_stream = <_io.StringIO object at 0x7f21b43e62c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.manager.AsyncContentsManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.contents_manager_class=jupyter_server.services.contents.manager.AsyncContentsManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.contents_manager_class=jupyter_server.services.contents.manager.AsyncContentsManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b43682d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:09.800 ServerApp] Config changed: {'ContentsManager': {'checkpoints_class': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ContentsManager': {'checkpoints_class': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As1/config DEBUG ServerApp:application.py:457 Config changed: {'ContentsManager': {'checkpoints_class': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'contents_manager_class': 'jupyter_server.services.contents.manager.AsyncContentsManager'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As1/config DEBUG ServerApp:application.py:457 Config changed: {'ContentsManager': {'checkpoints_class': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'contents_manager_class': 'jupyter_server.services.contents.manager.AsyncContentsManager'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ContentsManager': {'checkpoints_class': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'contents_manager_class': 'jupyter_server.services.contents.manager.AsyncContentsManager'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_async_contents_manager_As1/config/jupyter_server_config.json _________________________ test_save[LargeFileManager] __________________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_large_contents_manager = async def test_save(jp_large_contents_manager): cm = jp_large_contents_manager > model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_large_contents_manager = tests/services/contents/test_largefilemanager.py:22: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/largefilemanager.py:60: in save return super().save(model, path) __class__ = chunk = None model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_save_LargeFileManager_0/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 9, 947960, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 9, 947960, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_save_LargeFileManager_0/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4e8be30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________________ test_save[AsyncLargeFileManager] _______________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_large_contents_manager = async def test_save(jp_large_contents_manager): cm = jp_large_contents_manager > model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_large_contents_manager = tests/services/contents/test_largefilemanager.py:22: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/largefilemanager.py:133: in save return await super().save(model, path) __class__ = chunk = None model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_save_AsyncLargeFileManage0/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 10, 104959, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 10, 104959, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_save_AsyncLargeFileManage0/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b41bdc70> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ________________ test_saving_different_chunks[LargeFileManager] ________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_large_contents_manager = async def test_saving_different_chunks(jp_large_contents_manager): cm = jp_large_contents_manager model = { "name": "test", "path": "test", "type": "file", "content": "test==", "format": "text", } name = model["name"] path = model["path"] > await ensure_async(cm.save(model, path)) cm = jp_large_contents_manager = model = {'content': 'test==', 'format': 'text', 'name': 'test', 'path': 'test', 'type': 'file'} name = 'test' path = 'test' tests/services/contents/test_largefilemanager.py:82: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/largefilemanager.py:60: in save return super().save(model, path) __class__ = chunk = None model = {'content': 'test==', 'format': 'text', 'name': 'test', 'path': 'test', 'type': 'file'} path = 'test' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': 'test==', 'format': 'text', 'name': 'test', 'path': 'test', 'type': 'file'} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_saving_different_chunks_L0/test' path = 'test' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'test'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 10, 284957, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 10, 284957, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'test', 'path': 'test', 'size': 6, 'type': 'file', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_saving_different_chunks_L0/test' path = 'test' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'test'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b407ada0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _____________ test_saving_different_chunks[AsyncLargeFileManager] ______________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_large_contents_manager = async def test_saving_different_chunks(jp_large_contents_manager): cm = jp_large_contents_manager model = { "name": "test", "path": "test", "type": "file", "content": "test==", "format": "text", } name = model["name"] path = model["path"] > await ensure_async(cm.save(model, path)) cm = jp_large_contents_manager = model = {'content': 'test==', 'format': 'text', 'name': 'test', 'path': 'test', 'type': 'file'} name = 'test' path = 'test' tests/services/contents/test_largefilemanager.py:82: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/largefilemanager.py:133: in save return await super().save(model, path) __class__ = chunk = None model = {'content': 'test==', 'format': 'text', 'name': 'test', 'path': 'test', 'type': 'file'} path = 'test' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': 'test==', 'format': 'text', 'name': 'test', 'path': 'test', 'type': 'file'} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_saving_different_chunks_A0/test' path = 'test' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 10, 431956, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 10, 431956, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'test', 'path': 'test', 'size': 6, 'type': 'file', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_saving_different_chunks_A0/test' path = 'test' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'test'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4078690> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _________________ test_save_in_subdirectory[LargeFileManager] __________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_large_contents_manager = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_save_in_subdirectory_Larg0') async def test_save_in_subdirectory(jp_large_contents_manager, tmp_path): cm = jp_large_contents_manager sub_dir = tmp_path / "foo" sub_dir.mkdir() > model = await ensure_async(cm.new_untitled(path="/foo/", type="notebook")) cm = jp_large_contents_manager = sub_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_save_in_subdirectory_Larg0/foo') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_save_in_subdirectory_Larg0') tests/services/contents/test_largefilemanager.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = 'foo/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'foo/Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/largefilemanager.py:60: in save return super().save(model, path) __class__ = chunk = None model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'foo/Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_save_in_subdirectory_Larg0/foo/Untitled.ipynb' path = 'foo/Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'foo/Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 10, 588955, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 10, 588955, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'foo/Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_save_in_subdirectory_Larg0/foo/Untitled.ipynb' path = 'foo/Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'foo/Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b40ac230> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________ test_save_in_subdirectory[AsyncLargeFileManager] _______________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_large_contents_manager = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_save_in_subdirectory_Asyn0') async def test_save_in_subdirectory(jp_large_contents_manager, tmp_path): cm = jp_large_contents_manager sub_dir = tmp_path / "foo" sub_dir.mkdir() > model = await ensure_async(cm.new_untitled(path="/foo/", type="notebook")) cm = jp_large_contents_manager = sub_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_save_in_subdirectory_Asyn0/foo') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_save_in_subdirectory_Asyn0') tests/services/contents/test_largefilemanager.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = 'foo/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'foo/Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/largefilemanager.py:133: in save return await super().save(model, path) __class__ = chunk = None model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'foo/Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_save_in_subdirectory_Asyn0/foo/Untitled.ipynb' path = 'foo/Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 10, 740954, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 10, 740954, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'foo/Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_save_in_subdirectory_Asyn0/foo/Untitled.ipynb' path = 'foo/Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'foo/Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b40ae260> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ____________________ test_bad_symlink[FileContentsManager] _____________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_file_contents_manager_class = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_bad_symlink_FileContentsM0') async def test_bad_symlink(jp_file_contents_manager_class, tmp_path): td = str(tmp_path) cm = jp_file_contents_manager_class(root_dir=td) path = "test bad symlink" _make_dir(cm, path) > file_model = await ensure_async(cm.new_untitled(path=path, ext=".txt")) cm = jp_file_contents_manager_class = path = 'test bad symlink' td = '/tmp/pytest-of-mockbuild/pytest-0/test_bad_symlink_FileContentsM0' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_bad_symlink_FileContentsM0') tests/services/contents/test_manager.py:228: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.txt' insert = '' model = {'content': '', 'format': 'text', 'type': 'file'} name = 'untitled.txt' path = 'test bad symlink/untitled.txt' self = type = '' untitled = 'untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': '', 'format': 'text', 'type': 'file'} path = 'test bad symlink/untitled.txt' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': '', 'format': 'text', 'type': 'file'} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_bad_symlink_FileContentsM0/test bad ' 'symlink/untitled.txt') path = 'test bad symlink/untitled.txt' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'test bad symlink/untitled.txt'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 10, 929953, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 10, 929953, tzinfo=datetime.timezone.utc), 'mimetype': 'text/plain', 'name': 'untitled.txt', 'path': 'test bad symlink/untitled.txt', 'size': 0, 'type': 'file', 'writable': True} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_bad_symlink_FileContentsM0/test bad ' 'symlink/untitled.txt') path = 'test bad symlink/untitled.txt' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'test bad symlink/untitled.txt'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4011db0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning __________________ test_bad_symlink[AsyncFileContentsManager] __________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_file_contents_manager_class = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_bad_symlink_AsyncFileCont0') async def test_bad_symlink(jp_file_contents_manager_class, tmp_path): td = str(tmp_path) cm = jp_file_contents_manager_class(root_dir=td) path = "test bad symlink" _make_dir(cm, path) > file_model = await ensure_async(cm.new_untitled(path=path, ext=".txt")) cm = jp_file_contents_manager_class = path = 'test bad symlink' td = '/tmp/pytest-of-mockbuild/pytest-0/test_bad_symlink_AsyncFileCont0' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_bad_symlink_AsyncFileCont0') tests/services/contents/test_manager.py:228: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.txt' insert = '' model = {'content': '', 'format': 'text', 'type': 'file'} name = 'untitled.txt' path = 'test bad symlink/untitled.txt' self = type = '' untitled = 'untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': '', 'format': 'text', 'type': 'file'} path = 'test bad symlink/untitled.txt' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': '', 'format': 'text', 'type': 'file'} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_bad_symlink_AsyncFileCont0/test bad ' 'symlink/untitled.txt') path = 'test bad symlink/untitled.txt' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 11, 90952, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 11, 90952, tzinfo=datetime.timezone.utc), 'mimetype': 'text/plain', 'name': 'untitled.txt', 'path': 'test bad symlink/untitled.txt', 'size': 0, 'type': 'file', 'writable': True} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_bad_symlink_AsyncFileCont0/test bad ' 'symlink/untitled.txt') path = 'test bad symlink/untitled.txt' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'test bad symlink/untitled.txt'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b40134d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _________________ test_recursive_symlink[FileContentsManager] __________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_file_contents_manager_class = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_recursive_symlink_FileCon0') @pytest.mark.skipif(sys.platform.startswith("win"), reason="Windows doesn't detect symlink loops") async def test_recursive_symlink(jp_file_contents_manager_class, tmp_path): td = str(tmp_path) cm = jp_file_contents_manager_class(root_dir=td) path = "test recursive symlink" _make_dir(cm, path) > file_model = await ensure_async(cm.new_untitled(path=path, ext=".txt")) cm = jp_file_contents_manager_class = path = 'test recursive symlink' td = '/tmp/pytest-of-mockbuild/pytest-0/test_recursive_symlink_FileCon0' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_recursive_symlink_FileCon0') tests/services/contents/test_manager.py:248: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.txt' insert = '' model = {'content': '', 'format': 'text', 'type': 'file'} name = 'untitled.txt' path = 'test recursive symlink/untitled.txt' self = type = '' untitled = 'untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': '', 'format': 'text', 'type': 'file'} path = 'test recursive symlink/untitled.txt' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': '', 'format': 'text', 'type': 'file'} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_recursive_symlink_FileCon0/test ' 'recursive symlink/untitled.txt') path = 'test recursive symlink/untitled.txt' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'test recursive symlink/untitled.txt'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 11, 261950, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 11, 261950, tzinfo=datetime.timezone.utc), 'mimetype': 'text/plain', 'name': 'untitled.txt', 'path': 'test recursive symlink/untitled.txt', 'size': 0, 'type': 'file', 'writable': True} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_recursive_symlink_FileCon0/test ' 'recursive symlink/untitled.txt') path = 'test recursive symlink/untitled.txt' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'test recursive symlink/untitled.txt'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b40ce080> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________ test_recursive_symlink[AsyncFileContentsManager] _______________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_file_contents_manager_class = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_recursive_symlink_AsyncFi0') @pytest.mark.skipif(sys.platform.startswith("win"), reason="Windows doesn't detect symlink loops") async def test_recursive_symlink(jp_file_contents_manager_class, tmp_path): td = str(tmp_path) cm = jp_file_contents_manager_class(root_dir=td) path = "test recursive symlink" _make_dir(cm, path) > file_model = await ensure_async(cm.new_untitled(path=path, ext=".txt")) cm = jp_file_contents_manager_class = path = 'test recursive symlink' td = '/tmp/pytest-of-mockbuild/pytest-0/test_recursive_symlink_AsyncFi0' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_recursive_symlink_AsyncFi0') tests/services/contents/test_manager.py:248: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.txt' insert = '' model = {'content': '', 'format': 'text', 'type': 'file'} name = 'untitled.txt' path = 'test recursive symlink/untitled.txt' self = type = '' untitled = 'untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': '', 'format': 'text', 'type': 'file'} path = 'test recursive symlink/untitled.txt' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': '', 'format': 'text', 'type': 'file'} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_recursive_symlink_AsyncFi0/test ' 'recursive symlink/untitled.txt') path = 'test recursive symlink/untitled.txt' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 11, 419949, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 11, 419949, tzinfo=datetime.timezone.utc), 'mimetype': 'text/plain', 'name': 'untitled.txt', 'path': 'test recursive symlink/untitled.txt', 'size': 0, 'type': 'file', 'writable': True} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_recursive_symlink_AsyncFi0/test ' 'recursive symlink/untitled.txt') path = 'test recursive symlink/untitled.txt' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'test recursive symlink/untitled.txt'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b40cc820> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ____________________ test_good_symlink[FileContentsManager] ____________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_file_contents_manager_class = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_good_symlink_FileContents0') async def test_good_symlink(jp_file_contents_manager_class, tmp_path): td = str(tmp_path) cm = jp_file_contents_manager_class(root_dir=td) parent = "test good symlink" name = "good symlink" path = f"{parent}/{name}" _make_dir(cm, parent) > file_model = await ensure_async(cm.new(path=parent + "/zfoo.txt")) cm = jp_file_contents_manager_class = name = 'good symlink' parent = 'test good symlink' path = 'test good symlink/good symlink' td = '/tmp/pytest-of-mockbuild/pytest-0/test_good_symlink_FileContents0' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_good_symlink_FileContents0') tests/services/contents/test_manager.py:269: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': '', 'format': 'text', 'type': 'file'} path = 'test good symlink/zfoo.txt' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': '', 'format': 'text', 'type': 'file'} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_good_symlink_FileContents0/test good ' 'symlink/zfoo.txt') path = 'test good symlink/zfoo.txt' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'test good symlink/zfoo.txt'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 11, 588948, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 11, 588948, tzinfo=datetime.timezone.utc), 'mimetype': 'text/plain', 'name': 'zfoo.txt', 'path': 'test good symlink/zfoo.txt', 'size': 0, 'type': 'file', 'writable': True} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_good_symlink_FileContents0/test good ' 'symlink/zfoo.txt') path = 'test good symlink/zfoo.txt' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'test good symlink/zfoo.txt'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b40cd0e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _________________ test_good_symlink[AsyncFileContentsManager] __________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_file_contents_manager_class = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_good_symlink_AsyncFileCon0') async def test_good_symlink(jp_file_contents_manager_class, tmp_path): td = str(tmp_path) cm = jp_file_contents_manager_class(root_dir=td) parent = "test good symlink" name = "good symlink" path = f"{parent}/{name}" _make_dir(cm, parent) > file_model = await ensure_async(cm.new(path=parent + "/zfoo.txt")) cm = jp_file_contents_manager_class = name = 'good symlink' parent = 'test good symlink' path = 'test good symlink/good symlink' td = '/tmp/pytest-of-mockbuild/pytest-0/test_good_symlink_AsyncFileCon0' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_good_symlink_AsyncFileCon0') tests/services/contents/test_manager.py:269: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': '', 'format': 'text', 'type': 'file'} path = 'test good symlink/zfoo.txt' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': '', 'format': 'text', 'type': 'file'} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_good_symlink_AsyncFileCon0/test good ' 'symlink/zfoo.txt') path = 'test good symlink/zfoo.txt' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 11, 740947, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 11, 740947, tzinfo=datetime.timezone.utc), 'mimetype': 'text/plain', 'name': 'zfoo.txt', 'path': 'test good symlink/zfoo.txt', 'size': 0, 'type': 'file', 'writable': True} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_good_symlink_AsyncFileCon0/test good ' 'symlink/zfoo.txt') path = 'test good symlink/zfoo.txt' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'test good symlink/zfoo.txt'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4060780> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ________________________ test_403[FileContentsManager] _________________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_file_contents_manager_class = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_403_FileContentsManager_0') @pytest.mark.skipif(sys.platform.startswith("win"), reason="Can't test permissions on Windows") async def test_403(jp_file_contents_manager_class, tmp_path): if hasattr(os, "getuid") and os.getuid() == 0: raise pytest.skip("Can't test permissions as root") td = str(tmp_path) cm = jp_file_contents_manager_class(root_dir=td) > model = await ensure_async(cm.new_untitled(type="file")) cm = jp_file_contents_manager_class = td = '/tmp/pytest-of-mockbuild/pytest-0/test_403_FileContentsManager_0' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_403_FileContentsManager_0') tests/services/contents/test_manager.py:288: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '' insert = '' model = {'content': '', 'format': 'text', 'type': 'file'} name = 'untitled' path = '/untitled' self = type = 'file' untitled = 'untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': '', 'format': 'text', 'type': 'file'} path = 'untitled' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': '', 'format': 'text', 'type': 'file'} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_403_FileContentsManager_0/untitled' path = 'untitled' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'untitled'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 11, 914946, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 11, 914946, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'untitled', 'path': 'untitled', 'size': 0, 'type': 'file', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_403_FileContentsManager_0/untitled' path = 'untitled' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'untitled'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b4061a90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______________________ test_403[AsyncFileContentsManager] ______________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_file_contents_manager_class = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_403_AsyncFileContentsMana0') @pytest.mark.skipif(sys.platform.startswith("win"), reason="Can't test permissions on Windows") async def test_403(jp_file_contents_manager_class, tmp_path): if hasattr(os, "getuid") and os.getuid() == 0: raise pytest.skip("Can't test permissions as root") td = str(tmp_path) cm = jp_file_contents_manager_class(root_dir=td) > model = await ensure_async(cm.new_untitled(type="file")) cm = jp_file_contents_manager_class = td = '/tmp/pytest-of-mockbuild/pytest-0/test_403_AsyncFileContentsMana0' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_403_AsyncFileContentsMana0') tests/services/contents/test_manager.py:288: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '' insert = '' model = {'content': '', 'format': 'text', 'type': 'file'} name = 'untitled' path = '/untitled' self = type = 'file' untitled = 'untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': '', 'format': 'text', 'type': 'file'} path = 'untitled' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': '', 'format': 'text', 'type': 'file'} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_403_AsyncFileContentsMana0/untitled' path = 'untitled' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 12, 283943, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 12, 283943, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'untitled', 'path': 'untitled', 'size': 0, 'type': 'file', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_403_AsyncFileContentsMana0/untitled' path = 'untitled' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'untitled'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b40624e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ________________________ test_404[FileContentsManager] _________________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_file_contents_manager_class = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_404_FileContentsManager_0') async def test_404(jp_file_contents_manager_class, tmp_path): # setup td = str(tmp_path) cm = jp_file_contents_manager_class(root_dir=td) # Test visible file in hidden folder cm.allow_hidden = True hidden_dir = ".hidden" file_in_hidden_path = os.path.join(hidden_dir, "visible.txt") _make_dir(cm, hidden_dir) > model = await ensure_async(cm.new(path=file_in_hidden_path)) cm = file_in_hidden_path = '.hidden/visible.txt' hidden_dir = '.hidden' jp_file_contents_manager_class = td = '/tmp/pytest-of-mockbuild/pytest-0/test_404_FileContentsManager_0' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_404_FileContentsManager_0') tests/services/contents/test_manager.py:418: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': '', 'format': 'text', 'type': 'file'} path = '.hidden/visible.txt' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': '', 'format': 'text', 'type': 'file'} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_404_FileContentsManager_0/.hidden/visible.txt' path = '.hidden/visible.txt' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: '.hidden/visible.txt'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 12, 454942, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 12, 454942, tzinfo=datetime.timezone.utc), 'mimetype': 'text/plain', 'name': 'visible.txt', 'path': '.hidden/visible.txt', 'size': 0, 'type': 'file', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_404_FileContentsManager_0/.hidden/visible.txt' path = '.hidden/visible.txt' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': '.hidden/visible.txt'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b401ad50> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______________________ test_404[AsyncFileContentsManager] ______________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_file_contents_manager_class = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_404_AsyncFileContentsMana0') async def test_404(jp_file_contents_manager_class, tmp_path): # setup td = str(tmp_path) cm = jp_file_contents_manager_class(root_dir=td) # Test visible file in hidden folder cm.allow_hidden = True hidden_dir = ".hidden" file_in_hidden_path = os.path.join(hidden_dir, "visible.txt") _make_dir(cm, hidden_dir) > model = await ensure_async(cm.new(path=file_in_hidden_path)) cm = file_in_hidden_path = '.hidden/visible.txt' hidden_dir = '.hidden' jp_file_contents_manager_class = td = '/tmp/pytest-of-mockbuild/pytest-0/test_404_AsyncFileContentsMana0' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_404_AsyncFileContentsMana0') tests/services/contents/test_manager.py:418: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': '', 'format': 'text', 'type': 'file'} path = '.hidden/visible.txt' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': '', 'format': 'text', 'type': 'file'} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_404_AsyncFileContentsMana0/.hidden/visible.txt' path = '.hidden/visible.txt' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 12, 612941, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 12, 612941, tzinfo=datetime.timezone.utc), 'mimetype': 'text/plain', 'name': 'visible.txt', 'path': '.hidden/visible.txt', 'size': 0, 'type': 'file', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_404_AsyncFileContentsMana0/.hidden/visible.txt' path = '.hidden/visible.txt' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': '.hidden/visible.txt'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b401ae90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ___________________ test_new_untitled[jp_contents_manager0] ____________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_new_untitled(jp_contents_manager): cm = jp_contents_manager # Test in root directory > model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = tests/services/contents/test_manager.py:491: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_new_untitled_jp_contents_0/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 12, 779940, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 12, 779940, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_new_untitled_jp_contents_0/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b40634d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ___________________ test_new_untitled[jp_contents_manager1] ____________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_new_untitled(jp_contents_manager): cm = jp_contents_manager # Test in root directory > model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = tests/services/contents/test_manager.py:491: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_new_untitled_jp_contents_1/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 12, 943939, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 12, 943939, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_new_untitled_jp_contents_1/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3f89040> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ___________________ test_new_untitled[jp_contents_manager2] ____________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_new_untitled(jp_contents_manager): cm = jp_contents_manager # Test in root directory > model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = tests/services/contents/test_manager.py:491: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_new_untitled_jp_contents_2/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 13, 106938, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 13, 106938, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_new_untitled_jp_contents_2/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3f89900> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ___________________ test_new_untitled[jp_contents_manager3] ____________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_new_untitled(jp_contents_manager): cm = jp_contents_manager # Test in root directory > model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = tests/services/contents/test_manager.py:491: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_new_untitled_jp_contents_3/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 13, 272936, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 13, 272936, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_new_untitled_jp_contents_3/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3f5e170> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ___________________ test_modified_date[jp_contents_manager0] ___________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_modified_date(jp_contents_manager): cm = jp_contents_manager # Create a new notebook. > nb, name, path = await new_notebook(cm) cm = jp_contents_manager = tests/services/contents/test_manager.py:530: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:132: in new_notebook full_model, path = await prepare_notebook(jp_contents_manager) jp_contents_manager = tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_modified_date_jp_contents0/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 13, 440935, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 13, 440935, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_modified_date_jp_contents0/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3f5d770> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ___________________ test_modified_date[jp_contents_manager1] ___________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_modified_date(jp_contents_manager): cm = jp_contents_manager # Create a new notebook. > nb, name, path = await new_notebook(cm) cm = jp_contents_manager = tests/services/contents/test_manager.py:530: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:132: in new_notebook full_model, path = await prepare_notebook(jp_contents_manager) jp_contents_manager = tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_modified_date_jp_contents1/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 13, 623934, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 13, 623934, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_modified_date_jp_contents1/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3fd94f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ___________________ test_modified_date[jp_contents_manager2] ___________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_modified_date(jp_contents_manager): cm = jp_contents_manager # Create a new notebook. > nb, name, path = await new_notebook(cm) cm = jp_contents_manager = tests/services/contents/test_manager.py:530: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:132: in new_notebook full_model, path = await prepare_notebook(jp_contents_manager) jp_contents_manager = tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_modified_date_jp_contents2/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 13, 808933, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 13, 808933, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_modified_date_jp_contents2/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3f89950> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ___________________ test_modified_date[jp_contents_manager3] ___________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_modified_date(jp_contents_manager): cm = jp_contents_manager # Create a new notebook. > nb, name, path = await new_notebook(cm) cm = jp_contents_manager = tests/services/contents/test_manager.py:530: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:132: in new_notebook full_model, path = await prepare_notebook(jp_contents_manager) jp_contents_manager = tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_modified_date_jp_contents3/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 13, 988931, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 13, 988931, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_modified_date_jp_contents3/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3fdbac0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ________________________ test_get[jp_contents_manager0] ________________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_get(jp_contents_manager): cm = jp_contents_manager # Create a notebook > model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = tests/services/contents/test_manager.py:553: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_get_jp_contents_manager0_0/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 14, 168930, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 14, 168930, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_get_jp_contents_manager0_0/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3f20230> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ________________________ test_get[jp_contents_manager1] ________________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_get(jp_contents_manager): cm = jp_contents_manager # Create a notebook > model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = tests/services/contents/test_manager.py:553: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_get_jp_contents_manager1_0/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 14, 338929, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 14, 338929, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_get_jp_contents_manager1_0/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3f23570> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ________________________ test_get[jp_contents_manager2] ________________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_get(jp_contents_manager): cm = jp_contents_manager # Create a notebook > model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = tests/services/contents/test_manager.py:553: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_get_jp_contents_manager2_0/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 14, 514928, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 14, 514928, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_get_jp_contents_manager2_0/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3f514f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ________________________ test_get[jp_contents_manager3] ________________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_get(jp_contents_manager): cm = jp_contents_manager # Create a notebook > model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = tests/services/contents/test_manager.py:553: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_get_jp_contents_manager3_0/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 14, 694926, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 14, 694926, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_get_jp_contents_manager3_0/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3f239d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______________________ test_update[jp_contents_manager0] _______________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_update(jp_contents_manager): cm = jp_contents_manager # Create a notebook. > model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = tests/services/contents/test_manager.py:674: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_update_jp_contents_manage0/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 14, 875925, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 14, 875925, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_update_jp_contents_manage0/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3f53520> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______________________ test_update[jp_contents_manager1] _______________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_update(jp_contents_manager): cm = jp_contents_manager # Create a notebook. > model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = tests/services/contents/test_manager.py:674: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_update_jp_contents_manage1/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 15, 53924, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 15, 53924, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_update_jp_contents_manage1/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3f523a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______________________ test_update[jp_contents_manager2] _______________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_update(jp_contents_manager): cm = jp_contents_manager # Create a notebook. > model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = tests/services/contents/test_manager.py:674: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_update_jp_contents_manage2/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 15, 223923, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 15, 223923, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_update_jp_contents_manage2/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3f29770> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______________________ test_update[jp_contents_manager3] _______________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_update(jp_contents_manager): cm = jp_contents_manager # Create a notebook. > model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = tests/services/contents/test_manager.py:674: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_update_jp_contents_manage3/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 15, 397921, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 15, 397921, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_update_jp_contents_manage3/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3f2b0c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________________ test_save[jp_contents_manager0] ________________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_save(jp_contents_manager): cm = jp_contents_manager # Create a notebook > model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = tests/services/contents/test_manager.py:715: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_save_jp_contents_manager00/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 15, 576920, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 15, 576920, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_save_jp_contents_manager00/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3d31c20> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________________ test_save[jp_contents_manager1] ________________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_save(jp_contents_manager): cm = jp_contents_manager # Create a notebook > model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = tests/services/contents/test_manager.py:715: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_save_jp_contents_manager10/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 15, 747919, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 15, 747919, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_save_jp_contents_manager10/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3d32800> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________________ test_save[jp_contents_manager2] ________________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_save(jp_contents_manager): cm = jp_contents_manager # Create a notebook > model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = tests/services/contents/test_manager.py:715: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_save_jp_contents_manager20/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 15, 919918, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 15, 919918, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_save_jp_contents_manager20/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3d85590> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________________ test_save[jp_contents_manager3] ________________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_save(jp_contents_manager): cm = jp_contents_manager # Create a notebook > model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = tests/services/contents/test_manager.py:715: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_save_jp_contents_manager30/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 16, 326915, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 16, 326915, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_save_jp_contents_manager30/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3d86da0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______________________ test_delete[jp_contents_manager0] _______________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_delete(jp_contents_manager): cm = jp_contents_manager # Create a notebook > nb, name, path = await new_notebook(cm) cm = jp_contents_manager = tests/services/contents/test_manager.py:750: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:132: in new_notebook full_model, path = await prepare_notebook(jp_contents_manager) jp_contents_manager = tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_contents_manage0/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 16, 497914, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 16, 497914, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_contents_manage0/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3d87660> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______________________ test_delete[jp_contents_manager1] _______________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_delete(jp_contents_manager): cm = jp_contents_manager # Create a notebook > nb, name, path = await new_notebook(cm) cm = jp_contents_manager = tests/services/contents/test_manager.py:750: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:132: in new_notebook full_model, path = await prepare_notebook(jp_contents_manager) jp_contents_manager = tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_contents_manage1/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 16, 678912, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 16, 678912, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_contents_manage1/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3d740a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______________________ test_delete[jp_contents_manager2] _______________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_delete(jp_contents_manager): cm = jp_contents_manager # Create a notebook > nb, name, path = await new_notebook(cm) cm = jp_contents_manager = tests/services/contents/test_manager.py:750: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:132: in new_notebook full_model, path = await prepare_notebook(jp_contents_manager) jp_contents_manager = tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_contents_manage2/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 16, 856911, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 16, 856911, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_contents_manage2/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3d75900> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______________________ test_delete[jp_contents_manager3] _______________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_delete(jp_contents_manager): cm = jp_contents_manager # Create a notebook > nb, name, path = await new_notebook(cm) cm = jp_contents_manager = tests/services/contents/test_manager.py:750: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:132: in new_notebook full_model, path = await prepare_notebook(jp_contents_manager) jp_contents_manager = tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_contents_manage3/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 17, 38910, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 17, 38910, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_jp_contents_manage3/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3d77a70> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______ test_delete_non_empty_folder[jp_contents_manager0-True-True-False] ______ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: delete_to_trash = True, always_delete = True, error = False jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" > await make_populated_dir(cm, dir) always_delete = True cm = delete_to_trash = True dir = 'to_delete' error = False jp_contents_manager = tests/services/contents/test_manager.py:782: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:144: in make_populated_dir await ensure_async(cm.new(path="/".join([api_path, "nb.ipynb"]))) api_path = 'to_delete' cm = jp_contents_manager = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'to_delete/nb.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j0/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'to_delete/nb.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 17, 214909, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 17, 214909, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb.ipynb', 'path': 'to_delete/nb.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j0/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'to_delete/nb.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3dda170> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______ test_delete_non_empty_folder[jp_contents_manager0-True-False-None] ______ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: delete_to_trash = True, always_delete = False, error = None jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" > await make_populated_dir(cm, dir) always_delete = False cm = delete_to_trash = True dir = 'to_delete' error = None jp_contents_manager = tests/services/contents/test_manager.py:782: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:144: in make_populated_dir await ensure_async(cm.new(path="/".join([api_path, "nb.ipynb"]))) api_path = 'to_delete' cm = jp_contents_manager = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'to_delete/nb.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j1/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'to_delete/nb.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 17, 377908, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 17, 377908, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb.ipynb', 'path': 'to_delete/nb.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j1/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'to_delete/nb.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3dd9b30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _____ test_delete_non_empty_folder[jp_contents_manager0-False-True-False] ______ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: delete_to_trash = False, always_delete = True, error = False jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" > await make_populated_dir(cm, dir) always_delete = True cm = delete_to_trash = False dir = 'to_delete' error = False jp_contents_manager = tests/services/contents/test_manager.py:782: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:144: in make_populated_dir await ensure_async(cm.new(path="/".join([api_path, "nb.ipynb"]))) api_path = 'to_delete' cm = jp_contents_manager = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'to_delete/nb.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j2/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'to_delete/nb.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 17, 540906, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 17, 540906, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb.ipynb', 'path': 'to_delete/nb.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j2/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'to_delete/nb.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3dc1630> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _____ test_delete_non_empty_folder[jp_contents_manager0-False-False-True] ______ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: delete_to_trash = False, always_delete = False, error = True jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" > await make_populated_dir(cm, dir) always_delete = False cm = delete_to_trash = False dir = 'to_delete' error = True jp_contents_manager = tests/services/contents/test_manager.py:782: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:144: in make_populated_dir await ensure_async(cm.new(path="/".join([api_path, "nb.ipynb"]))) api_path = 'to_delete' cm = jp_contents_manager = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'to_delete/nb.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j3/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'to_delete/nb.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 17, 703905, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 17, 703905, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb.ipynb', 'path': 'to_delete/nb.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j3/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'to_delete/nb.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3dc3de0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______ test_delete_non_empty_folder[jp_contents_manager1-True-True-False] ______ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: delete_to_trash = True, always_delete = True, error = False jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" > await make_populated_dir(cm, dir) always_delete = True cm = delete_to_trash = True dir = 'to_delete' error = False jp_contents_manager = tests/services/contents/test_manager.py:782: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:144: in make_populated_dir await ensure_async(cm.new(path="/".join([api_path, "nb.ipynb"]))) api_path = 'to_delete' cm = jp_contents_manager = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'to_delete/nb.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j4/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'to_delete/nb.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 17, 863904, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 17, 863904, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb.ipynb', 'path': 'to_delete/nb.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j4/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'to_delete/nb.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3c15680> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______ test_delete_non_empty_folder[jp_contents_manager1-True-False-None] ______ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: delete_to_trash = True, always_delete = False, error = None jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" > await make_populated_dir(cm, dir) always_delete = False cm = delete_to_trash = True dir = 'to_delete' error = None jp_contents_manager = tests/services/contents/test_manager.py:782: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:144: in make_populated_dir await ensure_async(cm.new(path="/".join([api_path, "nb.ipynb"]))) api_path = 'to_delete' cm = jp_contents_manager = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'to_delete/nb.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j5/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'to_delete/nb.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 18, 28903, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 18, 28903, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb.ipynb', 'path': 'to_delete/nb.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j5/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'to_delete/nb.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3dc05f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _____ test_delete_non_empty_folder[jp_contents_manager1-False-True-False] ______ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: delete_to_trash = False, always_delete = True, error = False jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" > await make_populated_dir(cm, dir) always_delete = True cm = delete_to_trash = False dir = 'to_delete' error = False jp_contents_manager = tests/services/contents/test_manager.py:782: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:144: in make_populated_dir await ensure_async(cm.new(path="/".join([api_path, "nb.ipynb"]))) api_path = 'to_delete' cm = jp_contents_manager = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'to_delete/nb.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j6/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'to_delete/nb.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 18, 189902, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 18, 189902, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb.ipynb', 'path': 'to_delete/nb.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j6/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'to_delete/nb.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3c16670> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _____ test_delete_non_empty_folder[jp_contents_manager1-False-False-True] ______ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: delete_to_trash = False, always_delete = False, error = True jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" > await make_populated_dir(cm, dir) always_delete = False cm = delete_to_trash = False dir = 'to_delete' error = True jp_contents_manager = tests/services/contents/test_manager.py:782: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:144: in make_populated_dir await ensure_async(cm.new(path="/".join([api_path, "nb.ipynb"]))) api_path = 'to_delete' cm = jp_contents_manager = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'to_delete/nb.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j7/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'to_delete/nb.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 18, 354901, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 18, 354901, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb.ipynb', 'path': 'to_delete/nb.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j7/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'to_delete/nb.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3cf4190> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______ test_delete_non_empty_folder[jp_contents_manager2-True-True-False] ______ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: delete_to_trash = True, always_delete = True, error = False jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" > await make_populated_dir(cm, dir) always_delete = True cm = delete_to_trash = True dir = 'to_delete' error = False jp_contents_manager = tests/services/contents/test_manager.py:782: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:144: in make_populated_dir await ensure_async(cm.new(path="/".join([api_path, "nb.ipynb"]))) api_path = 'to_delete' cm = jp_contents_manager = /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'to_delete/nb.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j8/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 18, 520900, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 18, 520900, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb.ipynb', 'path': 'to_delete/nb.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j8/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'to_delete/nb.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3cf5f90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______ test_delete_non_empty_folder[jp_contents_manager2-True-False-None] ______ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: delete_to_trash = True, always_delete = False, error = None jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" > await make_populated_dir(cm, dir) always_delete = False cm = delete_to_trash = True dir = 'to_delete' error = None jp_contents_manager = tests/services/contents/test_manager.py:782: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:144: in make_populated_dir await ensure_async(cm.new(path="/".join([api_path, "nb.ipynb"]))) api_path = 'to_delete' cm = jp_contents_manager = /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'to_delete/nb.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j9/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 18, 690898, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 18, 690898, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb.ipynb', 'path': 'to_delete/nb.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j9/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'to_delete/nb.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3cf4460> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _____ test_delete_non_empty_folder[jp_contents_manager2-False-True-False] ______ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: delete_to_trash = False, always_delete = True, error = False jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" > await make_populated_dir(cm, dir) always_delete = True cm = delete_to_trash = False dir = 'to_delete' error = False jp_contents_manager = tests/services/contents/test_manager.py:782: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:144: in make_populated_dir await ensure_async(cm.new(path="/".join([api_path, "nb.ipynb"]))) api_path = 'to_delete' cm = jp_contents_manager = /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'to_delete/nb.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j10/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 18, 855897, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 18, 855897, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb.ipynb', 'path': 'to_delete/nb.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j10/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'to_delete/nb.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3cea490> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _____ test_delete_non_empty_folder[jp_contents_manager2-False-False-True] ______ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: delete_to_trash = False, always_delete = False, error = True jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" > await make_populated_dir(cm, dir) always_delete = False cm = delete_to_trash = False dir = 'to_delete' error = True jp_contents_manager = tests/services/contents/test_manager.py:782: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:144: in make_populated_dir await ensure_async(cm.new(path="/".join([api_path, "nb.ipynb"]))) api_path = 'to_delete' cm = jp_contents_manager = /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'to_delete/nb.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j11/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 19, 18896, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 19, 18896, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb.ipynb', 'path': 'to_delete/nb.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j11/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'to_delete/nb.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3ceb250> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______ test_delete_non_empty_folder[jp_contents_manager3-True-True-False] ______ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: delete_to_trash = True, always_delete = True, error = False jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" > await make_populated_dir(cm, dir) always_delete = True cm = delete_to_trash = True dir = 'to_delete' error = False jp_contents_manager = tests/services/contents/test_manager.py:782: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:144: in make_populated_dir await ensure_async(cm.new(path="/".join([api_path, "nb.ipynb"]))) api_path = 'to_delete' cm = jp_contents_manager = /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'to_delete/nb.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j12/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 19, 178895, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 19, 178895, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb.ipynb', 'path': 'to_delete/nb.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j12/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'to_delete/nb.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3c06170> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______ test_delete_non_empty_folder[jp_contents_manager3-True-False-None] ______ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: delete_to_trash = True, always_delete = False, error = None jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" > await make_populated_dir(cm, dir) always_delete = False cm = delete_to_trash = True dir = 'to_delete' error = None jp_contents_manager = tests/services/contents/test_manager.py:782: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:144: in make_populated_dir await ensure_async(cm.new(path="/".join([api_path, "nb.ipynb"]))) api_path = 'to_delete' cm = jp_contents_manager = /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'to_delete/nb.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j13/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 19, 340894, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 19, 340894, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb.ipynb', 'path': 'to_delete/nb.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j13/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'to_delete/nb.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3c06530> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _____ test_delete_non_empty_folder[jp_contents_manager3-False-True-False] ______ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: delete_to_trash = False, always_delete = True, error = False jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" > await make_populated_dir(cm, dir) always_delete = True cm = delete_to_trash = False dir = 'to_delete' error = False jp_contents_manager = tests/services/contents/test_manager.py:782: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:144: in make_populated_dir await ensure_async(cm.new(path="/".join([api_path, "nb.ipynb"]))) api_path = 'to_delete' cm = jp_contents_manager = /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'to_delete/nb.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j14/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 19, 496893, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 19, 496893, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb.ipynb', 'path': 'to_delete/nb.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j14/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'to_delete/nb.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3a59d60> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _____ test_delete_non_empty_folder[jp_contents_manager3-False-False-True] ______ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: delete_to_trash = False, always_delete = False, error = True jp_contents_manager = @pytest.mark.parametrize( "delete_to_trash, always_delete, error", ( [True, True, False], # on linux test folder may not be on home folder drive # => if this is the case, _check_trash will be False [True, False, None], [False, True, False], [False, False, True], ), ) async def test_delete_non_empty_folder(delete_to_trash, always_delete, error, jp_contents_manager): cm = jp_contents_manager cm.delete_to_trash = delete_to_trash cm.always_delete_dir = always_delete dir = "to_delete" > await make_populated_dir(cm, dir) always_delete = False cm = delete_to_trash = False dir = 'to_delete' error = True jp_contents_manager = tests/services/contents/test_manager.py:782: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:144: in make_populated_dir await ensure_async(cm.new(path="/".join([api_path, "nb.ipynb"]))) api_path = 'to_delete' cm = jp_contents_manager = /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'to_delete/nb.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j15/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 19, 656892, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 19, 656892, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb.ipynb', 'path': 'to_delete/nb.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_delete_non_empty_folder_j15/to_delete/nb.ipynb' path = 'to_delete/nb.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'to_delete/nb.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3a59950> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______________________ test_rename[jp_contents_manager0] _______________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_rename(jp_contents_manager): cm = jp_contents_manager # Create a new notebook > nb, name, path = await new_notebook(cm) cm = jp_contents_manager = tests/services/contents/test_manager.py:808: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:132: in new_notebook full_model, path = await prepare_notebook(jp_contents_manager) jp_contents_manager = tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_rename_jp_contents_manage0/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 19, 819890, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 19, 819890, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_rename_jp_contents_manage0/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b39fdb80> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______________________ test_rename[jp_contents_manager1] _______________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_rename(jp_contents_manager): cm = jp_contents_manager # Create a new notebook > nb, name, path = await new_notebook(cm) cm = jp_contents_manager = tests/services/contents/test_manager.py:808: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:132: in new_notebook full_model, path = await prepare_notebook(jp_contents_manager) jp_contents_manager = tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_rename_jp_contents_manage1/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 20, 210888, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 20, 210888, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_rename_jp_contents_manage1/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b39ff5c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______________________ test_rename[jp_contents_manager2] _______________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_rename(jp_contents_manager): cm = jp_contents_manager # Create a new notebook > nb, name, path = await new_notebook(cm) cm = jp_contents_manager = tests/services/contents/test_manager.py:808: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:132: in new_notebook full_model, path = await prepare_notebook(jp_contents_manager) jp_contents_manager = tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_rename_jp_contents_manage2/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 20, 380886, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 20, 380886, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_rename_jp_contents_manage2/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3c06a80> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______________________ test_rename[jp_contents_manager3] _______________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_rename(jp_contents_manager): cm = jp_contents_manager # Create a new notebook > nb, name, path = await new_notebook(cm) cm = jp_contents_manager = tests/services/contents/test_manager.py:808: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:132: in new_notebook full_model, path = await prepare_notebook(jp_contents_manager) jp_contents_manager = tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_rename_jp_contents_manage3/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 20, 563885, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 20, 563885, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_rename_jp_contents_manage3/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3ae43c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________________ test_copy[jp_contents_manager0] ________________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_copy(jp_contents_manager): cm = jp_contents_manager parent = "å b" name = "nb √.ipynb" path = f"{parent}/{name}" _make_dir(cm, parent) > orig = await ensure_async(cm.new(path=path)) cm = jp_contents_manager = name = 'nb √.ipynb' parent = 'å b' path = 'å b/nb √.ipynb' tests/services/contents/test_manager.py:871: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'å b/nb √.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_jp_contents_manager00/å b/nb ' '√.ipynb') path = 'å b/nb √.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'å b/nb √.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 20, 744884, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 20, 744884, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb √.ipynb', 'path': 'å b/nb √.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_jp_contents_manager00/å b/nb ' '√.ipynb') path = 'å b/nb √.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'å b/nb √.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3ae7390> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________________ test_copy[jp_contents_manager1] ________________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_copy(jp_contents_manager): cm = jp_contents_manager parent = "å b" name = "nb √.ipynb" path = f"{parent}/{name}" _make_dir(cm, parent) > orig = await ensure_async(cm.new(path=path)) cm = jp_contents_manager = name = 'nb √.ipynb' parent = 'å b' path = 'å b/nb √.ipynb' tests/services/contents/test_manager.py:871: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'å b/nb √.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_jp_contents_manager10/å b/nb ' '√.ipynb') path = 'å b/nb √.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'å b/nb √.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 20, 912883, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 20, 912883, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb √.ipynb', 'path': 'å b/nb √.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_jp_contents_manager10/å b/nb ' '√.ipynb') path = 'å b/nb √.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'å b/nb √.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3ae59a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________________ test_copy[jp_contents_manager2] ________________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_copy(jp_contents_manager): cm = jp_contents_manager parent = "å b" name = "nb √.ipynb" path = f"{parent}/{name}" _make_dir(cm, parent) > orig = await ensure_async(cm.new(path=path)) cm = jp_contents_manager = name = 'nb √.ipynb' parent = 'å b' path = 'å b/nb √.ipynb' tests/services/contents/test_manager.py:871: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'å b/nb √.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_jp_contents_manager20/å b/nb ' '√.ipynb') path = 'å b/nb √.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 21, 76881, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 21, 76881, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb √.ipynb', 'path': 'å b/nb √.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_jp_contents_manager20/å b/nb ' '√.ipynb') path = 'å b/nb √.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'å b/nb √.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3abd900> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________________ test_copy[jp_contents_manager3] ________________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_copy(jp_contents_manager): cm = jp_contents_manager parent = "å b" name = "nb √.ipynb" path = f"{parent}/{name}" _make_dir(cm, parent) > orig = await ensure_async(cm.new(path=path)) cm = jp_contents_manager = name = 'nb √.ipynb' parent = 'å b' path = 'å b/nb √.ipynb' tests/services/contents/test_manager.py:871: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'å b/nb √.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_jp_contents_manager30/å b/nb ' '√.ipynb') path = 'å b/nb √.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 21, 246880, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 21, 246880, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb √.ipynb', 'path': 'å b/nb √.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_jp_contents_manager30/å b/nb ' '√.ipynb') path = 'å b/nb √.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'å b/nb √.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3abea30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _____________________ test_copy_dir[jp_contents_manager0] ______________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_copy_dir(jp_contents_manager): cm = jp_contents_manager destDir = "Untitled Folder 1" sourceDir = "Morningstar Notebooks" nonExistantDir = "FolderDoesNotExist" _make_dir(cm, destDir) _make_dir(cm, sourceDir) nestedDir = f"{destDir}/{sourceDir}" # copy one folder insider another folder > copy = await ensure_async(cm.copy(from_path=sourceDir, to_path=destDir)) cm = destDir = 'Untitled Folder 1' jp_contents_manager = nestedDir = 'Untitled Folder 1/Morningstar Notebooks' nonExistantDir = 'FolderDoesNotExist' sourceDir = 'Morningstar Notebooks' tests/services/contents/test_manager.py:907: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:639: in copy model = self.get(path) __class__ = from_dir = '' from_name = 'Morningstar Notebooks' from_path = 'Morningstar Notebooks' path = 'Morningstar Notebooks' self = to_path = 'Untitled Folder 1' to_path_original = 'Untitled Folder 1' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = True format = None four_o_four = "file or directory does not exist: 'Morningstar Notebooks'" model = {'content': [], 'created': datetime.datetime(2024, 12, 18, 10, 42, 21, 412879, tzinfo=datetime.timezone.utc), 'format': 'json', 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 21, 412879, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Morningstar Notebooks', 'path': 'Morningstar Notebooks', 'size': None, 'type': 'directory', 'writable': True} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_jp_contents_mana0/Morningstar ' 'Notebooks') path = 'Morningstar Notebooks' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Morningstar Notebooks'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3a451d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _____________________ test_copy_dir[jp_contents_manager1] ______________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_copy_dir(jp_contents_manager): cm = jp_contents_manager destDir = "Untitled Folder 1" sourceDir = "Morningstar Notebooks" nonExistantDir = "FolderDoesNotExist" _make_dir(cm, destDir) _make_dir(cm, sourceDir) nestedDir = f"{destDir}/{sourceDir}" # copy one folder insider another folder > copy = await ensure_async(cm.copy(from_path=sourceDir, to_path=destDir)) cm = destDir = 'Untitled Folder 1' jp_contents_manager = nestedDir = 'Untitled Folder 1/Morningstar Notebooks' nonExistantDir = 'FolderDoesNotExist' sourceDir = 'Morningstar Notebooks' tests/services/contents/test_manager.py:907: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:639: in copy model = self.get(path) __class__ = from_dir = '' from_name = 'Morningstar Notebooks' from_path = 'Morningstar Notebooks' path = 'Morningstar Notebooks' self = to_path = 'Untitled Folder 1' to_path_original = 'Untitled Folder 1' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = True format = None four_o_four = "file or directory does not exist: 'Morningstar Notebooks'" model = {'content': [], 'created': datetime.datetime(2024, 12, 18, 10, 42, 21, 573878, tzinfo=datetime.timezone.utc), 'format': 'json', 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 21, 573878, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Morningstar Notebooks', 'path': 'Morningstar Notebooks', 'size': None, 'type': 'directory', 'writable': True} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_jp_contents_mana1/Morningstar ' 'Notebooks') path = 'Morningstar Notebooks' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Morningstar Notebooks'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3a46670> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _____________________ test_copy_dir[jp_contents_manager2] ______________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_copy_dir(jp_contents_manager): cm = jp_contents_manager destDir = "Untitled Folder 1" sourceDir = "Morningstar Notebooks" nonExistantDir = "FolderDoesNotExist" _make_dir(cm, destDir) _make_dir(cm, sourceDir) nestedDir = f"{destDir}/{sourceDir}" # copy one folder insider another folder > copy = await ensure_async(cm.copy(from_path=sourceDir, to_path=destDir)) cm = destDir = 'Untitled Folder 1' jp_contents_manager = nestedDir = 'Untitled Folder 1/Morningstar Notebooks' nonExistantDir = 'FolderDoesNotExist' sourceDir = 'Morningstar Notebooks' tests/services/contents/test_manager.py:907: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:1120: in copy model = await self.get(path) __class__ = from_dir = '' from_name = 'Morningstar Notebooks' from_path = 'Morningstar Notebooks' path = 'Morningstar Notebooks' self = to_path = 'Untitled Folder 1' to_path_original = 'Untitled Folder 1' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = True format = None model = {'content': [], 'created': datetime.datetime(2024, 12, 18, 10, 42, 21, 728877, tzinfo=datetime.timezone.utc), 'format': 'json', 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 21, 728877, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Morningstar Notebooks', 'path': 'Morningstar Notebooks', 'size': None, 'type': 'directory', 'writable': True} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_jp_contents_mana2/Morningstar ' 'Notebooks') path = 'Morningstar Notebooks' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Morningstar Notebooks'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3abc6e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _____________________ test_copy_dir[jp_contents_manager3] ______________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_copy_dir(jp_contents_manager): cm = jp_contents_manager destDir = "Untitled Folder 1" sourceDir = "Morningstar Notebooks" nonExistantDir = "FolderDoesNotExist" _make_dir(cm, destDir) _make_dir(cm, sourceDir) nestedDir = f"{destDir}/{sourceDir}" # copy one folder insider another folder > copy = await ensure_async(cm.copy(from_path=sourceDir, to_path=destDir)) cm = destDir = 'Untitled Folder 1' jp_contents_manager = nestedDir = 'Untitled Folder 1/Morningstar Notebooks' nonExistantDir = 'FolderDoesNotExist' sourceDir = 'Morningstar Notebooks' tests/services/contents/test_manager.py:907: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:1120: in copy model = await self.get(path) __class__ = from_dir = '' from_name = 'Morningstar Notebooks' from_path = 'Morningstar Notebooks' path = 'Morningstar Notebooks' self = to_path = 'Untitled Folder 1' to_path_original = 'Untitled Folder 1' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = True format = None model = {'content': [], 'created': datetime.datetime(2024, 12, 18, 10, 42, 21, 886876, tzinfo=datetime.timezone.utc), 'format': 'json', 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 21, 886876, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Morningstar Notebooks', 'path': 'Morningstar Notebooks', 'size': None, 'type': 'directory', 'writable': True} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_dir_jp_contents_mana3/Morningstar ' 'Notebooks') path = 'Morningstar Notebooks' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Morningstar Notebooks'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3abd220> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ___________________ test_copy_big_dir[jp_contents_manager0] ____________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = @pytest.mark.skipif(os.name == "nt", reason="Copying big dirs on Window") async def test_copy_big_dir(jp_contents_manager): # this tests how the Content API limits preventing copying folders that are more than # the size limit specified in max_copy_folder_size_mb trait cm = jp_contents_manager destDir = "Untitled Folder 1" sourceDir = "Morningstar Notebooks" cm.max_copy_folder_size_mb = 5 _make_dir(cm, destDir) _make_big_dir(contents_manager=cm, api_path=sourceDir) with pytest.raises(HTTPError) as exc_info: > await ensure_async(cm.copy(from_path=sourceDir, to_path=destDir)) cm = destDir = 'Untitled Folder 1' exc_info = jp_contents_manager = sourceDir = 'Morningstar Notebooks' tests/services/contents/test_manager.py:940: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:639: in copy model = self.get(path) __class__ = from_dir = '' from_name = 'Morningstar Notebooks' from_path = 'Morningstar Notebooks' path = 'Morningstar Notebooks' self = to_path = 'Untitled Folder 1' to_path_original = 'Untitled Folder 1' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:454: in get model = self._dir_model(path, content=content) content = True format = None four_o_four = "file or directory does not exist: 'Morningstar Notebooks'" os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_big_dir_jp_contents_0/Morningstar ' 'Notebooks') path = 'Morningstar Notebooks' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:328: in _dir_model contents.append(self.get(path=f"{path}/{name}", content=False)) content = True contents = [] four_o_four = "directory does not exist: 'Morningstar Notebooks'" model = {'content': [], 'created': datetime.datetime(2024, 12, 18, 10, 42, 22, 337873, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 22, 337873, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Morningstar Notebooks', 'path': 'Morningstar Notebooks', 'size': None, 'type': 'directory', 'writable': True} name = 'demofile.txt' os_dir = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_big_dir_jp_contents_0/Morningstar ' 'Notebooks') os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_big_dir_jp_contents_0/Morningstar ' 'Notebooks/demofile.txt') path = 'Morningstar Notebooks' self = st = os.stat_result(st_mode=33188, st_ino=65308, st_dev=69, st_nlink=1, st_uid=1001, st_gid=135, st_size=555, st_atime=1734518542, st_mtime=1734518542, st_ctime=1734518542) ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Morningstar Notebooks/demofile.txt'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 22, 41875, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 22, 41875, tzinfo=datetime.timezone.utc), 'mimetype': 'text/plain', 'name': 'demofile.txt', 'path': 'Morningstar Notebooks/demofile.txt', 'size': 555, 'type': 'file', 'writable': True} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_big_dir_jp_contents_0/Morningstar ' 'Notebooks/demofile.txt') path = 'Morningstar Notebooks/demofile.txt' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Morningstar Notebooks/demofile.txt'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3bf5180> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ___________________ test_copy_big_dir[jp_contents_manager1] ____________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = @pytest.mark.skipif(os.name == "nt", reason="Copying big dirs on Window") async def test_copy_big_dir(jp_contents_manager): # this tests how the Content API limits preventing copying folders that are more than # the size limit specified in max_copy_folder_size_mb trait cm = jp_contents_manager destDir = "Untitled Folder 1" sourceDir = "Morningstar Notebooks" cm.max_copy_folder_size_mb = 5 _make_dir(cm, destDir) _make_big_dir(contents_manager=cm, api_path=sourceDir) with pytest.raises(HTTPError) as exc_info: > await ensure_async(cm.copy(from_path=sourceDir, to_path=destDir)) cm = destDir = 'Untitled Folder 1' exc_info = jp_contents_manager = sourceDir = 'Morningstar Notebooks' tests/services/contents/test_manager.py:940: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:639: in copy model = self.get(path) __class__ = from_dir = '' from_name = 'Morningstar Notebooks' from_path = 'Morningstar Notebooks' path = 'Morningstar Notebooks' self = to_path = 'Untitled Folder 1' to_path_original = 'Untitled Folder 1' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:454: in get model = self._dir_model(path, content=content) content = True format = None four_o_four = "file or directory does not exist: 'Morningstar Notebooks'" os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_big_dir_jp_contents_1/Morningstar ' 'Notebooks') path = 'Morningstar Notebooks' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:328: in _dir_model contents.append(self.get(path=f"{path}/{name}", content=False)) content = True contents = [] four_o_four = "directory does not exist: 'Morningstar Notebooks'" model = {'content': [], 'created': datetime.datetime(2024, 12, 18, 10, 42, 22, 823869, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 22, 823869, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Morningstar Notebooks', 'path': 'Morningstar Notebooks', 'size': None, 'type': 'directory', 'writable': True} name = 'demofile.txt' os_dir = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_big_dir_jp_contents_1/Morningstar ' 'Notebooks') os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_big_dir_jp_contents_1/Morningstar ' 'Notebooks/demofile.txt') path = 'Morningstar Notebooks' self = st = os.stat_result(st_mode=33188, st_ino=75363, st_dev=69, st_nlink=1, st_uid=1001, st_gid=135, st_size=555, st_atime=1734518542, st_mtime=1734518542, st_ctime=1734518542) ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Morningstar Notebooks/demofile.txt'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 22, 522871, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 22, 522871, tzinfo=datetime.timezone.utc), 'mimetype': 'text/plain', 'name': 'demofile.txt', 'path': 'Morningstar Notebooks/demofile.txt', 'size': 555, 'type': 'file', 'writable': True} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_big_dir_jp_contents_1/Morningstar ' 'Notebooks/demofile.txt') path = 'Morningstar Notebooks/demofile.txt' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Morningstar Notebooks/demofile.txt'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3bf5b30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ___________________ test_copy_big_dir[jp_contents_manager2] ____________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = @pytest.mark.skipif(os.name == "nt", reason="Copying big dirs on Window") async def test_copy_big_dir(jp_contents_manager): # this tests how the Content API limits preventing copying folders that are more than # the size limit specified in max_copy_folder_size_mb trait cm = jp_contents_manager destDir = "Untitled Folder 1" sourceDir = "Morningstar Notebooks" cm.max_copy_folder_size_mb = 5 _make_dir(cm, destDir) _make_big_dir(contents_manager=cm, api_path=sourceDir) with pytest.raises(HTTPError) as exc_info: > await ensure_async(cm.copy(from_path=sourceDir, to_path=destDir)) cm = destDir = 'Untitled Folder 1' exc_info = jp_contents_manager = sourceDir = 'Morningstar Notebooks' tests/services/contents/test_manager.py:940: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:1120: in copy model = await self.get(path) __class__ = from_dir = '' from_name = 'Morningstar Notebooks' from_path = 'Morningstar Notebooks' path = 'Morningstar Notebooks' self = to_path = 'Untitled Folder 1' to_path_original = 'Untitled Folder 1' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:920: in get model = await self._dir_model(path, content=content) content = True format = None os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_big_dir_jp_contents_2/Morningstar ' 'Notebooks') path = 'Morningstar Notebooks' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:801: in _dir_model contents.append(await self.get(path=f"{path}/{name}", content=False)) content = True contents = [] dir_contents = ['demofile.txt', 'subfolder-0', 'subfolder-1', 'subfolder-2', 'subfolder-3', 'subfolder-4', 'subfolder-5', 'subfolder-6', 'subfolder-7', 'subfolder-8', 'subfolder-9', 'subfolder-10', 'subfolder-11', 'subfolder-12', 'subfolder-13', 'subfolder-14', 'subfolder-15', 'subfolder-16', 'subfolder-17', 'subfolder-18', 'subfolder-19', 'subfolder-20', 'subfolder-21', 'subfolder-22', 'subfolder-23', 'subfolder-24', 'subfolder-25', 'subfolder-26', 'subfolder-27', 'subfolder-28', 'subfolder-29', 'subfolder-30', 'subfolder-31', 'subfolder-32', 'subfolder-33', 'subfolder-34', 'subfolder-35', 'subfolder-36', 'subfolder-37', 'subfolder-38', 'subfolder-39', 'subfolder-40', 'subfolder-41', 'subfolder-42', 'subfolder-43', 'subfolder-44', 'subfolder-45', 'subfolder-46', 'subfolder-47', 'subfolder-48', 'subfolder-49'] four_o_four = "directory does not exist: 'Morningstar Notebooks'" model = {'content': [], 'created': datetime.datetime(2024, 12, 18, 10, 42, 23, 298866, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 23, 298866, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Morningstar Notebooks', 'path': 'Morningstar Notebooks', 'size': None, 'type': 'directory', 'writable': True} name = 'demofile.txt' os_dir = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_big_dir_jp_contents_2/Morningstar ' 'Notebooks') os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_big_dir_jp_contents_2/Morningstar ' 'Notebooks/demofile.txt') path = 'Morningstar Notebooks' self = st = os.stat_result(st_mode=33188, st_ino=85418, st_dev=69, st_nlink=1, st_uid=1001, st_gid=135, st_size=555, st_atime=1734518543, st_mtime=1734518542, st_ctime=1734518542) ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 22, 999868, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 22, 999868, tzinfo=datetime.timezone.utc), 'mimetype': 'text/plain', 'name': 'demofile.txt', 'path': 'Morningstar Notebooks/demofile.txt', 'size': 555, 'type': 'file', 'writable': True} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_big_dir_jp_contents_2/Morningstar ' 'Notebooks/demofile.txt') path = 'Morningstar Notebooks/demofile.txt' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Morningstar Notebooks/demofile.txt'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3bd43c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ___________________ test_copy_big_dir[jp_contents_manager3] ____________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = @pytest.mark.skipif(os.name == "nt", reason="Copying big dirs on Window") async def test_copy_big_dir(jp_contents_manager): # this tests how the Content API limits preventing copying folders that are more than # the size limit specified in max_copy_folder_size_mb trait cm = jp_contents_manager destDir = "Untitled Folder 1" sourceDir = "Morningstar Notebooks" cm.max_copy_folder_size_mb = 5 _make_dir(cm, destDir) _make_big_dir(contents_manager=cm, api_path=sourceDir) with pytest.raises(HTTPError) as exc_info: > await ensure_async(cm.copy(from_path=sourceDir, to_path=destDir)) cm = destDir = 'Untitled Folder 1' exc_info = jp_contents_manager = sourceDir = 'Morningstar Notebooks' tests/services/contents/test_manager.py:940: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:1120: in copy model = await self.get(path) __class__ = from_dir = '' from_name = 'Morningstar Notebooks' from_path = 'Morningstar Notebooks' path = 'Morningstar Notebooks' self = to_path = 'Untitled Folder 1' to_path_original = 'Untitled Folder 1' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:920: in get model = await self._dir_model(path, content=content) content = True format = None os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_big_dir_jp_contents_3/Morningstar ' 'Notebooks') path = 'Morningstar Notebooks' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:801: in _dir_model contents.append(await self.get(path=f"{path}/{name}", content=False)) content = True contents = [] dir_contents = ['demofile.txt', 'subfolder-0', 'subfolder-1', 'subfolder-2', 'subfolder-3', 'subfolder-4', 'subfolder-5', 'subfolder-6', 'subfolder-7', 'subfolder-8', 'subfolder-9', 'subfolder-10', 'subfolder-11', 'subfolder-12', 'subfolder-13', 'subfolder-14', 'subfolder-15', 'subfolder-16', 'subfolder-17', 'subfolder-18', 'subfolder-19', 'subfolder-20', 'subfolder-21', 'subfolder-22', 'subfolder-23', 'subfolder-24', 'subfolder-25', 'subfolder-26', 'subfolder-27', 'subfolder-28', 'subfolder-29', 'subfolder-30', 'subfolder-31', 'subfolder-32', 'subfolder-33', 'subfolder-34', 'subfolder-35', 'subfolder-36', 'subfolder-37', 'subfolder-38', 'subfolder-39', 'subfolder-40', 'subfolder-41', 'subfolder-42', 'subfolder-43', 'subfolder-44', 'subfolder-45', 'subfolder-46', 'subfolder-47', 'subfolder-48', 'subfolder-49'] four_o_four = "directory does not exist: 'Morningstar Notebooks'" model = {'content': [], 'created': datetime.datetime(2024, 12, 18, 10, 42, 23, 788862, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 23, 788862, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Morningstar Notebooks', 'path': 'Morningstar Notebooks', 'size': None, 'type': 'directory', 'writable': True} name = 'demofile.txt' os_dir = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_big_dir_jp_contents_3/Morningstar ' 'Notebooks') os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_big_dir_jp_contents_3/Morningstar ' 'Notebooks/demofile.txt') path = 'Morningstar Notebooks' self = st = os.stat_result(st_mode=33188, st_ino=95473, st_dev=69, st_nlink=1, st_uid=1001, st_gid=135, st_size=555, st_atime=1734518543, st_mtime=1734518543, st_ctime=1734518543) ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 23, 487864, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 23, 487864, tzinfo=datetime.timezone.utc), 'mimetype': 'text/plain', 'name': 'demofile.txt', 'path': 'Morningstar Notebooks/demofile.txt', 'size': 555, 'type': 'file', 'writable': True} os_path = ('/tmp/pytest-of-mockbuild/pytest-0/test_copy_big_dir_jp_contents_3/Morningstar ' 'Notebooks/demofile.txt') path = 'Morningstar Notebooks/demofile.txt' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Morningstar Notebooks/demofile.txt'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3bd5a90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ________________ test_mark_trusted_cells[jp_contents_manager0] _________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_mark_trusted_cells(jp_contents_manager): cm = jp_contents_manager > nb, name, path = await new_notebook(cm) cm = jp_contents_manager = tests/services/contents/test_manager.py:947: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:132: in new_notebook full_model, path = await prepare_notebook(jp_contents_manager) jp_contents_manager = tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_mark_trusted_cells_jp_con0/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 23, 978861, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 23, 978861, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_mark_trusted_cells_jp_con0/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3bd5c20> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ________________ test_mark_trusted_cells[jp_contents_manager1] _________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_mark_trusted_cells(jp_contents_manager): cm = jp_contents_manager > nb, name, path = await new_notebook(cm) cm = jp_contents_manager = tests/services/contents/test_manager.py:947: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:132: in new_notebook full_model, path = await prepare_notebook(jp_contents_manager) jp_contents_manager = tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_mark_trusted_cells_jp_con1/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 24, 169860, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 24, 169860, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_mark_trusted_cells_jp_con1/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3bd0aa0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ________________ test_mark_trusted_cells[jp_contents_manager2] _________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_mark_trusted_cells(jp_contents_manager): cm = jp_contents_manager > nb, name, path = await new_notebook(cm) cm = jp_contents_manager = tests/services/contents/test_manager.py:947: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:132: in new_notebook full_model, path = await prepare_notebook(jp_contents_manager) jp_contents_manager = tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_mark_trusted_cells_jp_con2/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 24, 360858, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 24, 360858, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_mark_trusted_cells_jp_con2/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3bd0640> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ________________ test_mark_trusted_cells[jp_contents_manager3] _________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_mark_trusted_cells(jp_contents_manager): cm = jp_contents_manager > nb, name, path = await new_notebook(cm) cm = jp_contents_manager = tests/services/contents/test_manager.py:947: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:132: in new_notebook full_model, path = await prepare_notebook(jp_contents_manager) jp_contents_manager = tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_mark_trusted_cells_jp_con3/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 24, 558857, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 24, 558857, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_mark_trusted_cells_jp_con3/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3bda030> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning __________________ test_check_and_sign[jp_contents_manager0] ___________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_check_and_sign(jp_contents_manager): cm = jp_contents_manager > nb, name, path = await new_notebook(cm) cm = jp_contents_manager = tests/services/contents/test_manager.py:963: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:132: in new_notebook full_model, path = await prepare_notebook(jp_contents_manager) jp_contents_manager = tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_check_and_sign_jp_content0/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 24, 746856, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 24, 746856, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_check_and_sign_jp_content0/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3bd3340> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning __________________ test_check_and_sign[jp_contents_manager1] ___________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_check_and_sign(jp_contents_manager): cm = jp_contents_manager > nb, name, path = await new_notebook(cm) cm = jp_contents_manager = tests/services/contents/test_manager.py:963: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:132: in new_notebook full_model, path = await prepare_notebook(jp_contents_manager) jp_contents_manager = tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_check_and_sign_jp_content1/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 24, 940854, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 24, 940854, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_check_and_sign_jp_content1/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3bdb480> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning __________________ test_check_and_sign[jp_contents_manager2] ___________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_check_and_sign(jp_contents_manager): cm = jp_contents_manager > nb, name, path = await new_notebook(cm) cm = jp_contents_manager = tests/services/contents/test_manager.py:963: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:132: in new_notebook full_model, path = await prepare_notebook(jp_contents_manager) jp_contents_manager = tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_check_and_sign_jp_content2/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 25, 129853, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 25, 129853, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_check_and_sign_jp_content2/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3ee48c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning __________________ test_check_and_sign[jp_contents_manager3] ___________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_check_and_sign(jp_contents_manager): cm = jp_contents_manager > nb, name, path = await new_notebook(cm) cm = jp_contents_manager = tests/services/contents/test_manager.py:963: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:132: in new_notebook full_model, path = await prepare_notebook(jp_contents_manager) jp_contents_manager = tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_check_and_sign_jp_content3/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 25, 592850, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 25, 592850, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_check_and_sign_jp_content3/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3ee6a30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ___________________ test_nb_validation[jp_contents_manager0] ___________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_nb_validation(jp_contents_manager): # Test that validation is performed once when a notebook is read or written > model, path = await prepare_notebook(jp_contents_manager, make_invalid=False) jp_contents_manager = tests/services/contents/test_manager.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_nb_validation_jp_contents0/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 25, 781848, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 25, 781848, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_nb_validation_jp_contents0/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3ee7ac0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ___________________ test_nb_validation[jp_contents_manager1] ___________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_nb_validation(jp_contents_manager): # Test that validation is performed once when a notebook is read or written > model, path = await prepare_notebook(jp_contents_manager, make_invalid=False) jp_contents_manager = tests/services/contents/test_manager.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_nb_validation_jp_contents1/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 25, 972847, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 25, 972847, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_nb_validation_jp_contents1/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3dfe760> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ___________________ test_nb_validation[jp_contents_manager2] ___________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_nb_validation(jp_contents_manager): # Test that validation is performed once when a notebook is read or written > model, path = await prepare_notebook(jp_contents_manager, make_invalid=False) jp_contents_manager = tests/services/contents/test_manager.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_nb_validation_jp_contents2/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 26, 156846, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 26, 156846, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_nb_validation_jp_contents2/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3dfcc80> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ___________________ test_nb_validation[jp_contents_manager3] ___________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_nb_validation(jp_contents_manager): # Test that validation is performed once when a notebook is read or written > model, path = await prepare_notebook(jp_contents_manager, make_invalid=False) jp_contents_manager = tests/services/contents/test_manager.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_nb_validation_jp_contents3/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 26, 350844, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 26, 350844, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_nb_validation_jp_contents3/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3e84320> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______________ test_validate_notebook_model[jp_contents_manager0] ______________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_validate_notebook_model(jp_contents_manager): # Test the validation_notebook_model method to ensure that validation is not # performed when a validation_error dictionary is provided and is performed # when that parameter is None. > model, path = await prepare_notebook(jp_contents_manager, make_invalid=False) jp_contents_manager = tests/services/contents/test_manager.py:1022: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_validate_notebook_model_j0/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 26, 531843, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 26, 531843, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_validate_notebook_model_j0/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3e85a40> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______________ test_validate_notebook_model[jp_contents_manager1] ______________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_validate_notebook_model(jp_contents_manager): # Test the validation_notebook_model method to ensure that validation is not # performed when a validation_error dictionary is provided and is performed # when that parameter is None. > model, path = await prepare_notebook(jp_contents_manager, make_invalid=False) jp_contents_manager = tests/services/contents/test_manager.py:1022: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:617: in new_untitled return self.new(model, path) ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_validate_notebook_model_j1/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'Untitled.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 26, 718842, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 26, 718842, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_validate_notebook_model_j1/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3e86120> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______________ test_validate_notebook_model[jp_contents_manager2] ______________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_validate_notebook_model(jp_contents_manager): # Test the validation_notebook_model method to ensure that validation is not # performed when a validation_error dictionary is provided and is performed # when that parameter is None. > model, path = await prepare_notebook(jp_contents_manager, make_invalid=False) jp_contents_manager = tests/services/contents/test_manager.py:1022: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_validate_notebook_model_j2/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 26, 902841, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 26, 902841, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_validate_notebook_model_j2/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3e8c870> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ______________ test_validate_notebook_model[jp_contents_manager3] ______________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: jp_contents_manager = async def test_validate_notebook_model(jp_contents_manager): # Test the validation_notebook_model method to ensure that validation is not # performed when a validation_error dictionary is provided and is performed # when that parameter is None. > model, path = await prepare_notebook(jp_contents_manager, make_invalid=False) jp_contents_manager = tests/services/contents/test_manager.py:1022: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:117: in prepare_notebook model = await ensure_async(cm.new_untitled(type="notebook")) cm = jp_contents_manager = make_invalid = False /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:993: in new_untitled return await self.new(model, path) dir_exists = True ext = '.ipynb' insert = '' model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} name = 'Untitled.ipynb' path = '/Untitled.ipynb' self = type = 'notebook' untitled = 'Untitled' ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'Untitled.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_validate_notebook_model_j3/Untitled.ipynb' path = 'Untitled.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 27, 104839, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 27, 104839, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'Untitled.ipynb', 'path': 'Untitled.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_validate_notebook_model_j3/Untitled.ipynb' path = 'Untitled.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'Untitled.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3e8e440> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________ test_regression_is_hidden[jp_contents_manager0] ________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: m1 = m2 = jp_contents_manager = @patch( "jupyter_core.paths.is_hidden", side_effect=AssertionError("Should not call is_hidden if not important"), ) @patch( "jupyter_server.services.contents.filemanager.is_hidden", side_effect=AssertionError("Should not call is_hidden if not important"), ) async def test_regression_is_hidden(m1, m2, jp_contents_manager): cm = jp_contents_manager cm.allow_hidden = True # Our role here is to check that the side-effect never triggers dirname = "foo/.hidden_dir" > await make_populated_dir(cm, dirname) cm = dirname = 'foo/.hidden_dir' jp_contents_manager = m1 = m2 = tests/services/contents/test_manager.py:1069: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:144: in make_populated_dir await ensure_async(cm.new(path="/".join([api_path, "nb.ipynb"]))) api_path = 'foo/.hidden_dir' cm = jp_contents_manager = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'foo/.hidden_dir/nb.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jp_c0/foo/.hidden_dir/nb.ipynb' path = 'foo/.hidden_dir/nb.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'foo/.hidden_dir/nb.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 27, 286838, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 27, 286838, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb.ipynb', 'path': 'foo/.hidden_dir/nb.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jp_c0/foo/.hidden_dir/nb.ipynb' path = 'foo/.hidden_dir/nb.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'foo/.hidden_dir/nb.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3e8f480> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________ test_regression_is_hidden[jp_contents_manager1] ________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: m1 = m2 = jp_contents_manager = @patch( "jupyter_core.paths.is_hidden", side_effect=AssertionError("Should not call is_hidden if not important"), ) @patch( "jupyter_server.services.contents.filemanager.is_hidden", side_effect=AssertionError("Should not call is_hidden if not important"), ) async def test_regression_is_hidden(m1, m2, jp_contents_manager): cm = jp_contents_manager cm.allow_hidden = True # Our role here is to check that the side-effect never triggers dirname = "foo/.hidden_dir" > await make_populated_dir(cm, dirname) cm = dirname = 'foo/.hidden_dir' jp_contents_manager = m1 = m2 = tests/services/contents/test_manager.py:1069: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:144: in make_populated_dir await ensure_async(cm.new(path="/".join([api_path, "nb.ipynb"]))) api_path = 'foo/.hidden_dir' cm = jp_contents_manager = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:643: in new model = self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'foo/.hidden_dir/nb.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:522: in save model = self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jp_c1/foo/.hidden_dir/nb.ipynb' path = 'foo/.hidden_dir/nb.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:463: in get self.emit(data={"action": "get", "path": path}) content = False format = None four_o_four = "file or directory does not exist: 'foo/.hidden_dir/nb.ipynb'" model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 27, 465837, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 27, 465837, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb.ipynb', 'path': 'foo/.hidden_dir/nb.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jp_c1/foo/.hidden_dir/nb.ipynb' path = 'foo/.hidden_dir/nb.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'foo/.hidden_dir/nb.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b392aa80> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________ test_regression_is_hidden[jp_contents_manager2] ________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: m1 = m2 = jp_contents_manager = @patch( "jupyter_core.paths.is_hidden", side_effect=AssertionError("Should not call is_hidden if not important"), ) @patch( "jupyter_server.services.contents.filemanager.is_hidden", side_effect=AssertionError("Should not call is_hidden if not important"), ) async def test_regression_is_hidden(m1, m2, jp_contents_manager): cm = jp_contents_manager cm.allow_hidden = True # Our role here is to check that the side-effect never triggers dirname = "foo/.hidden_dir" > await make_populated_dir(cm, dirname) cm = dirname = 'foo/.hidden_dir' jp_contents_manager = m1 = m2 = tests/services/contents/test_manager.py:1069: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:144: in make_populated_dir await ensure_async(cm.new(path="/".join([api_path, "nb.ipynb"]))) api_path = 'foo/.hidden_dir' cm = jp_contents_manager = /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'foo/.hidden_dir/nb.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jp_c2/foo/.hidden_dir/nb.ipynb' path = 'foo/.hidden_dir/nb.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 27, 635835, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 27, 635835, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb.ipynb', 'path': 'foo/.hidden_dir/nb.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jp_c2/foo/.hidden_dir/nb.ipynb' path = 'foo/.hidden_dir/nb.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'foo/.hidden_dir/nb.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3929fe0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _______________ test_regression_is_hidden[jp_contents_manager3] ________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: m1 = m2 = jp_contents_manager = @patch( "jupyter_core.paths.is_hidden", side_effect=AssertionError("Should not call is_hidden if not important"), ) @patch( "jupyter_server.services.contents.filemanager.is_hidden", side_effect=AssertionError("Should not call is_hidden if not important"), ) async def test_regression_is_hidden(m1, m2, jp_contents_manager): cm = jp_contents_manager cm.allow_hidden = True # Our role here is to check that the side-effect never triggers dirname = "foo/.hidden_dir" > await make_populated_dir(cm, dirname) cm = dirname = 'foo/.hidden_dir' jp_contents_manager = m1 = m2 = tests/services/contents/test_manager.py:1069: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/services/contents/test_manager.py:144: in make_populated_dir await ensure_async(cm.new(path="/".join([api_path, "nb.ipynb"]))) api_path = 'foo/.hidden_dir' cm = jp_contents_manager = /usr/lib/python3.13/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async result = await obj obj = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:1019: in new model = await self.save(model, path) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} path = 'foo/.hidden_dir/nb.ipynb' self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:985: in save model = await self.get(path, content=False) model = {'content': {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, 'format': 'json', 'type': 'notebook'} nb = {'cells': [], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jp_c3/foo/.hidden_dir/nb.ipynb' path = 'foo/.hidden_dir/nb.ipynb' self = validation_error = {} validation_message = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py:929: in get self.emit(data={"action": "get", "path": path}) content = False format = None model = {'content': None, 'created': datetime.datetime(2024, 12, 18, 10, 42, 27, 819834, tzinfo=datetime.timezone.utc), 'format': None, 'hash': None, 'hash_algorithm': None, 'last_modified': datetime.datetime(2024, 12, 18, 10, 42, 27, 819834, tzinfo=datetime.timezone.utc), 'mimetype': None, 'name': 'nb.ipynb', 'path': 'foo/.hidden_dir/nb.ipynb', 'size': 72, 'type': 'notebook', 'writable': True} os_path = '/tmp/pytest-of-mockbuild/pytest-0/test_regression_is_hidden_jp_c3/foo/.hidden_dir/nb.ipynb' path = 'foo/.hidden_dir/nb.ipynb' require_hash = False self = type = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:80: in emit self.event_logger.emit(schema_id=self.event_schema_id, data=data) data = {'action': 'get', 'path': 'foo/.hidden_dir/nb.ipynb'} self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py:75: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b398cb90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning __________________________ test_async_kernel_manager ___________________________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b37cc360> def test_async_kernel_manager(jp_configurable_serverapp): argv = [ "--ServerApp.kernel_manager_class=jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager" ] > app = jp_configurable_serverapp(argv=argv) argv = ['--ServerApp.kernel_manager_class=jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b37cc360> tests/services/kernels/test_config.py:22: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.kernel_manager_class=jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'MappingKernelManager': {'allowed_message_types': ['kernel_info_request']}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'MappingKernelManager': {'allowed_message_types': ['kernel_info_request']}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '38b49ba4' environ = None http_port = 36875 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b37cc540> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36875 jp_logging_stream = <_io.StringIO object at 0x7f21b37dd540> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_async_kernel_manager0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_async_kernel_manager0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_async_kernel_manager0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.kernel_manager_class=jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.kernel_manager_class=jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.kernel_manager_class=jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b349d590> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:31.782 ServerApp] Config changed: {'ServerApp': {'MappingKernelManager': {'allowed_message_types': ['kernel_info_request']}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'MappingKernelManager': {'allowed_message_types': ['kernel_info_request']}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_async_kernel_manager0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_async_kernel_manager0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_async_kernel_manager0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_kernel_manager0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_kernel_manager0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_kernel_manager0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'MappingKernelManager': {'allowed_message_types': ['kernel_info_request']}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_kernel_manager0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_kernel_manager0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_async_kernel_manager0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'MappingKernelManager': {'allowed_message_types': ['kernel_info_request']}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'MappingKernelManager': {'allowed_message_types': ['kernel_info_request']}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'kernel_manager_class': 'jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_async_kernel_manager0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_async_kernel_manager0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_async_kernel_manager0/config/jupyter_server_config.json ________________________ test_not_server_kernel_manager ________________________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b37cdda0> def test_not_server_kernel_manager(jp_configurable_serverapp): argv = [ "--AsyncMappingKernelManager.kernel_manager_class=jupyter_client.ioloop.manager.AsyncIOLoopKernelManager" ] > with pytest.warns(FutureWarning, match="is not a subclass of 'ServerKernelManager'"): E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 argv = ['--AsyncMappingKernelManager.kernel_manager_class=jupyter_client.ioloop.manager.AsyncIOLoopKernelManager'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b37cdda0> tests/services/kernels/test_config.py:30: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:31.865 ServerApp] Config changed: {'ServerApp': {'MappingKernelManager': {'allowed_message_types': ['kernel_info_request']}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'MappingKernelManager': {'allowed_message_types': ['kernel_info_request']}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_not_server_kernel_manager0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_not_server_kernel_manager0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_not_server_kernel_manager0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_not_server_kernel_manager0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_not_server_kernel_manager0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_not_server_kernel_manager0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'MappingKernelManager': {'allowed_message_types': ['kernel_info_request']}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'AsyncMappingKernelManager': {'kernel_manager_class': 'jupyter_client.ioloop.manager.AsyncIOLoopKernelManager'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_not_server_kernel_manager0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_not_server_kernel_manager0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_not_server_kernel_manager0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'MappingKernelManager': {'allowed_message_types': ['kernel_info_request']}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'AsyncMappingKernelManager': {'kernel_manager_class': 'jupyter_client.ioloop.manager.AsyncIOLoopKernelManager'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'MappingKernelManager': {'allowed_message_types': ['kernel_info_request']}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'AsyncMappingKernelManager': {'kernel_manager_class': 'jupyter_client.ioloop.manager.AsyncIOLoopKernelManager'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_not_server_kernel_manager0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_not_server_kernel_manager0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_not_server_kernel_manager0/config/jupyter_server_config.json INFO ServerApp:serverapp.py:3005 Serving notebooks from local directory: /tmp/pytest-of-mockbuild/pytest-0/test_not_server_kernel_manager0/root_dir INFO ServerApp:serverapp.py:3005 Jupyter Server 2.14.2 is running at: INFO ServerApp:serverapp.py:3005 http://localhost:46371/a%40b/?token=22f7d5114718fc19f5c9cd49f8ebd77232902e5905855d65 INFO ServerApp:serverapp.py:3005 http://127.0.0.1:46371/a%40b/?token=22f7d5114718fc19f5c9cd49f8ebd77232902e5905855d65 INFO ServerApp:serverapp.py:3006 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). CRITICAL ServerApp:serverapp.py:3068 To access the server, open this file in a browser: file:///tmp/pytest-of-mockbuild/pytest-0/test_not_server_kernel_manager0/runtime/jpserver-1338-open.html Or copy and paste one of these URLs: http://localhost:46371/a%40b/?token=22f7d5114718fc19f5c9cd49f8ebd77232902e5905855d65 http://127.0.0.1:46371/a%40b/?token=22f7d5114718fc19f5c9cd49f8ebd77232902e5905855d65 ---------------------------- Captured log teardown ----------------------------- INFO ServerApp:serverapp.py:2788 Shutting down 1 extension DEBUG ServerApp:manager.py:373 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopping DEBUG ServerApp:manager.py:375 jupyter_server_terminals | extension app 'jupyter_server_terminals' stopped ___________________ test_kernel_action_success_event[start] ____________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b3700980> action = 'start' jp_read_emitted_events = ._read at 0x7f21b37e5940> jp_event_handler = @pytest.mark.parametrize("action", ["start", "restart", "interrupt", "shutdown"]) async def test_kernel_action_success_event( monkeypatch, action, jp_read_emitted_events, jp_event_handler ): manager = ServerKernelManager() > manager.event_logger.register_handler(jp_event_handler) action = 'start' jp_event_handler = jp_read_emitted_events = ._read at 0x7f21b37e5940> manager = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b3700980> tests/services/kernels/test_events.py:15: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernels/kernelmanager.py:837: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') schemas = [PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml')] self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b376b9d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manag...if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/kernel_actions/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning __________________ test_kernel_action_success_event[restart] ___________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b340fc40> action = 'restart' jp_read_emitted_events = ._read at 0x7f21b37e5080> jp_event_handler = @pytest.mark.parametrize("action", ["start", "restart", "interrupt", "shutdown"]) async def test_kernel_action_success_event( monkeypatch, action, jp_read_emitted_events, jp_event_handler ): manager = ServerKernelManager() > manager.event_logger.register_handler(jp_event_handler) action = 'restart' jp_event_handler = jp_read_emitted_events = ._read at 0x7f21b37e5080> manager = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b340fc40> tests/services/kernels/test_events.py:15: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernels/kernelmanager.py:837: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') schemas = [PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml')] self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3764910> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manag...if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/kernel_actions/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _________________ test_kernel_action_success_event[interrupt] __________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b34d8a60> action = 'interrupt' jp_read_emitted_events = ._read at 0x7f21b37e65c0> jp_event_handler = @pytest.mark.parametrize("action", ["start", "restart", "interrupt", "shutdown"]) async def test_kernel_action_success_event( monkeypatch, action, jp_read_emitted_events, jp_event_handler ): manager = ServerKernelManager() > manager.event_logger.register_handler(jp_event_handler) action = 'interrupt' jp_event_handler = jp_read_emitted_events = ._read at 0x7f21b37e65c0> manager = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b34d8a60> tests/services/kernels/test_events.py:15: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernels/kernelmanager.py:837: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') schemas = [PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml')] self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3766210> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manag...if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/kernel_actions/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning __________________ test_kernel_action_success_event[shutdown] __________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b34d9080> action = 'shutdown' jp_read_emitted_events = ._read at 0x7f21b37e7060> jp_event_handler = @pytest.mark.parametrize("action", ["start", "restart", "interrupt", "shutdown"]) async def test_kernel_action_success_event( monkeypatch, action, jp_read_emitted_events, jp_event_handler ): manager = ServerKernelManager() > manager.event_logger.register_handler(jp_event_handler) action = 'shutdown' jp_event_handler = jp_read_emitted_events = ._read at 0x7f21b37e7060> manager = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b34d9080> tests/services/kernels/test_events.py:15: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernels/kernelmanager.py:837: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') schemas = [PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml')] self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3766800> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manag...if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/kernel_actions/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ____________________ test_kernel_action_failed_event[start] ____________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b34d9fd0> action = 'start' jp_read_emitted_events = ._read at 0x7f21b37e7e20> jp_event_handler = @pytest.mark.parametrize("action", ["start", "restart", "interrupt", "shutdown"]) async def test_kernel_action_failed_event( monkeypatch, action, jp_read_emitted_events, jp_event_handler ): manager = ServerKernelManager() > manager.event_logger.register_handler(jp_event_handler) action = 'start' jp_event_handler = jp_read_emitted_events = ._read at 0x7f21b37e7e20> manager = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b34d9fd0> tests/services/kernels/test_events.py:36: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernels/kernelmanager.py:837: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') schemas = [PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml')] self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3400870> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manag...if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/kernel_actions/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ___________________ test_kernel_action_failed_event[restart] ___________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b34db5b0> action = 'restart' jp_read_emitted_events = ._read at 0x7f21b3438fe0> jp_event_handler = @pytest.mark.parametrize("action", ["start", "restart", "interrupt", "shutdown"]) async def test_kernel_action_failed_event( monkeypatch, action, jp_read_emitted_events, jp_event_handler ): manager = ServerKernelManager() > manager.event_logger.register_handler(jp_event_handler) action = 'restart' jp_event_handler = jp_read_emitted_events = ._read at 0x7f21b3438fe0> manager = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b34db5b0> tests/services/kernels/test_events.py:36: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernels/kernelmanager.py:837: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') schemas = [PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml')] self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3403430> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manag...if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/kernel_actions/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning __________________ test_kernel_action_failed_event[interrupt] __________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b3488210> action = 'interrupt' jp_read_emitted_events = ._read at 0x7f21b3439080> jp_event_handler = @pytest.mark.parametrize("action", ["start", "restart", "interrupt", "shutdown"]) async def test_kernel_action_failed_event( monkeypatch, action, jp_read_emitted_events, jp_event_handler ): manager = ServerKernelManager() > manager.event_logger.register_handler(jp_event_handler) action = 'interrupt' jp_event_handler = jp_read_emitted_events = ._read at 0x7f21b3439080> manager = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b3488210> tests/services/kernels/test_events.py:36: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernels/kernelmanager.py:837: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') schemas = [PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml')] self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3401680> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manag...if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/kernel_actions/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning __________________ test_kernel_action_failed_event[shutdown] ___________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b34889f0> action = 'shutdown' jp_read_emitted_events = ._read at 0x7f21b3439b20> jp_event_handler = @pytest.mark.parametrize("action", ["start", "restart", "interrupt", "shutdown"]) async def test_kernel_action_failed_event( monkeypatch, action, jp_read_emitted_events, jp_event_handler ): manager = ServerKernelManager() > manager.event_logger.register_handler(jp_event_handler) action = 'shutdown' jp_event_handler = jp_read_emitted_events = ._read at 0x7f21b3439b20> manager = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b34889f0> tests/services/kernels/test_events.py:36: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernels/kernelmanager.py:837: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') schemas = [PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml')] self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3402530> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manag...if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/kernel_actions/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning __________________ test_kernel_action_http_error_event[start] __________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b3489fd0> action = 'start' jp_read_emitted_events = ._read at 0x7f21b343a3e0> jp_event_handler = @pytest.mark.parametrize("action", ["start", "restart", "interrupt", "shutdown"]) async def test_kernel_action_http_error_event( monkeypatch, action, jp_read_emitted_events, jp_event_handler ): manager = ServerKernelManager() > manager.event_logger.register_handler(jp_event_handler) action = 'start' jp_event_handler = jp_read_emitted_events = ._read at 0x7f21b343a3e0> manager = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b3489fd0> tests/services/kernels/test_events.py:59: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernels/kernelmanager.py:837: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') schemas = [PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml')] self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3450190> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manag...if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/kernel_actions/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning _________________ test_kernel_action_http_error_event[restart] _________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b348a660> action = 'restart' jp_read_emitted_events = ._read at 0x7f21b343ae80> jp_event_handler = @pytest.mark.parametrize("action", ["start", "restart", "interrupt", "shutdown"]) async def test_kernel_action_http_error_event( monkeypatch, action, jp_read_emitted_events, jp_event_handler ): manager = ServerKernelManager() > manager.event_logger.register_handler(jp_event_handler) action = 'restart' jp_event_handler = jp_read_emitted_events = ._read at 0x7f21b343ae80> manager = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b348a660> tests/services/kernels/test_events.py:59: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernels/kernelmanager.py:837: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') schemas = [PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml')] self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b34500f0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manag...if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/kernel_actions/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ________________ test_kernel_action_http_error_event[interrupt] ________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b3418e50> action = 'interrupt' jp_read_emitted_events = ._read at 0x7f21b343bba0> jp_event_handler = @pytest.mark.parametrize("action", ["start", "restart", "interrupt", "shutdown"]) async def test_kernel_action_http_error_event( monkeypatch, action, jp_read_emitted_events, jp_event_handler ): manager = ServerKernelManager() > manager.event_logger.register_handler(jp_event_handler) action = 'interrupt' jp_event_handler = jp_read_emitted_events = ._read at 0x7f21b343bba0> manager = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b3418e50> tests/services/kernels/test_events.py:59: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernels/kernelmanager.py:837: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') schemas = [PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml')] self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b34507d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manag...if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/kernel_actions/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ________________ test_kernel_action_http_error_event[shutdown] _________________ self = obj = cls = def get(self, obj: HasTraits, cls: type[t.Any] | None = None) -> G | None: assert self.name is not None try: > value = obj._trait_values[self.name] E KeyError: 'event_logger' cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:632: KeyError During handling of the above exception, another exception occurred: monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b34195c0> action = 'shutdown' jp_read_emitted_events = ._read at 0x7f21b3434220> jp_event_handler = @pytest.mark.parametrize("action", ["start", "restart", "interrupt", "shutdown"]) async def test_kernel_action_http_error_event( monkeypatch, action, jp_read_emitted_events, jp_event_handler ): manager = ServerKernelManager() > manager.event_logger.register_handler(jp_event_handler) action = 'shutdown' jp_event_handler = jp_read_emitted_events = ._read at 0x7f21b3434220> manager = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b34195c0> tests/services/kernels/test_events.py:59: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/traitlets/traitlets.py:687: in __get__ return t.cast(G, self.get(obj, cls)) # the G should encode the Optional cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:635: in get default = obj.trait_defaults(self.name) cls = obj = self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1897: in trait_defaults return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) metadata = {} n = 'event_logger' names = ('event_logger',) self = /usr/lib/python3.13/site-packages/traitlets/traitlets.py:1241: in __call__ return self.func(*args, **kwargs) args = (,) kwargs = {} self = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/services/kernels/kernelmanager.py:837: in _default_event_logger logger.register_event_schema(schema_path) logger = schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') schemas = [PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml')] self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/kernel_actions/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3452760> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manag...if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/kernel_actions/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/kernel_actions/v1', 'description': 'Record events of a kernel manager.\n', 'if': {'not': {'properties': {'action': {'const': 'start'}, 'status': {'const': 'error'}}}}, 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the Kernel ' 'Manager.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. start\n' ' A kernel has been started with ' 'the given kernel id.\n' '\n' '2. interrupt\n' ' A kernel has been interrupted ' 'for the given kernel id.\n' '\n' '3. shutdown\n' ' A kernel has been shut down for ' 'the given kernel id.\n' '\n' '4. restart\n' ' A kernel has been restarted for ' 'the given kernel id.\n', 'enum': ['start', 'interrupt', 'shutdown', 'restart']}, 'kernel_id': {'description': 'Kernel id.\n' '\n' 'This is a required field for all ' 'actions and statuses except ' 'action start with status ' 'error.\n', 'type': 'string'}, 'kernel_name': {'description': 'Name of the kernel.\n', 'type': 'string'}, 'msg': {'description': 'Description of the event specified in ' 'action.\n', 'type': 'string'}, 'status': {'description': 'Status received from a rest api ' 'operation to kernel server.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. error\n' ' Error response from a rest api ' 'operation to kernel server.\n' '\n' '2. success\n' ' Success response from a rest api ' 'operation to kernel server.\n', 'enum': ['error', 'success']}, 'status_code': {'description': 'Http response codes from a ' 'rest api operation to kernel ' 'server.\n' 'Examples: 200, 400, 502, 503, ' '599 etc\n', 'type': 'number'}}, 'required': ['action', 'msg'], 'then': {'required': ['kernel_id']}, 'title': 'Kernel Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ___________________________ test_gateway_cli_options ___________________________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7fcd3a0> capsys = <_pytest.capture.CaptureFixture object at 0x7f21b7b28ec0> def test_gateway_cli_options(jp_configurable_serverapp, capsys): argv = [ "--gateway-url=" + mock_gateway_url, "--GatewayClient.http_user=" + mock_http_user, "--GatewayClient.connect_timeout=44.4", "--GatewayClient.request_timeout=96.0", "--GatewayClient.launch_timeout_pad=5.1", "--GatewayClient.env_whitelist=FOO,BAR", ] GatewayClient.clear_instance() > app = jp_configurable_serverapp(argv=argv) argv = ['--gateway-url=http://mock-gateway-server:8889', '--GatewayClient.http_user=alice', '--GatewayClient.connect_timeout=44.4', '--GatewayClient.request_timeout=96.0', '--GatewayClient.launch_timeout_pad=5.1', '--GatewayClient.env_whitelist=FOO,BAR'] capsys = <_pytest.capture.CaptureFixture object at 0x7f21b7b28ec0> jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b7fcd3a0> tests/test_gateway.py:285: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--gateway-url=http://mock-gateway-server:8889', '--GatewayClient.http_user=alice', '--GatewayClient.connect_timeout=44.4', '--GatewayClient.request_timeout=96.0', '--GatewayClient.launch_timeout_pad=5.1', '--GatewayClient.env_whitelist=FOO,BAR'] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'f6e11c54' environ = None http_port = 33855 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b7fce3e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33855 jp_logging_stream = <_io.StringIO object at 0x7f21b3046c80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_cli_options0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_cli_options0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_cli_options0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--gateway-url=http://mock-gateway-server:8889', '--GatewayClient.http_user=alice', '--GatewayClient.connect_timeout=44.4', '--GatewayClient.request_timeout=96.0', '--GatewayClient.launch_timeout_pad=5.1', '--GatewayClient.env_whitelist=FOO,BAR'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--gateway-url=http://mock-gateway-server:8889', '--GatewayClient.http_user=alice', '--GatewayClient.connect_timeout=44.4', '--GatewayClient.request_timeout=96.0', '--GatewayClient.launch_timeout_pad=5.1', '--GatewayClient.env_whitelist=FOO,BAR'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--gateway-url=http://mock-gateway-server:8889', '--GatewayClient.http_user=alice', '--GatewayClient.connect_timeout=44.4', '--GatewayClient.request_timeout=96.0', '--GatewayClient.launch_timeout_pad=5.1', '--GatewayClient.env_whitelist=FOO,BAR'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7f1ad50> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:47.829 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_gateway_cli_options0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_cli_options0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_cli_options0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_cli_options0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_cli_options0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_cli_options0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'url': 'http://mock-gateway-server:8889', 'http_user': 'alice', 'connect_timeout': 44.4, 'request_timeout': 96.0, 'launch_timeout_pad': 5.1, 'env_whitelist': 'FOO,BAR'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_cli_options0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_cli_options0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_cli_options0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'url': 'http://mock-gateway-server:8889', 'http_user': 'alice', 'connect_timeout': 44.4, 'request_timeout': 96.0, 'launch_timeout_pad': 5.1, 'env_whitelist': 'FOO,BAR'}} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'url': 'http://mock-gateway-server:8889', 'http_user': 'alice', 'connect_timeout': 44.4, 'request_timeout': 96.0, 'launch_timeout_pad': 5.1, 'env_whitelist': 'FOO,BAR'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_cli_options0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_cli_options0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_cli_options0/config/jupyter_server_config.json _____________________ test_token_renewer_config[default-] ______________________ jp_server_config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2f3ea20> renewer_type = 'default', initial_auth_token = '' @pytest.mark.parametrize( "renewer_type,initial_auth_token", [("default", ""), ("custom", None), ("custom", "")] ) def test_token_renewer_config( jp_server_config, jp_configurable_serverapp, renewer_type, initial_auth_token ): argv = ["--gateway-url=" + mock_gateway_url] if renewer_type == "custom": argv.append( "--GatewayClient.gateway_token_renewer_class=tests.test_gateway.CustomTestTokenRenewer" ) if initial_auth_token is None: argv.append("--GatewayClient.auth_token=None") GatewayClient.clear_instance() > app = jp_configurable_serverapp(argv=argv) argv = ['--gateway-url=http://mock-gateway-server:8889'] initial_auth_token = '' jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2f3ea20> jp_server_config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} renewer_type = 'default' tests/test_gateway.py:323: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--gateway-url=http://mock-gateway-server:8889'] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '1ed6e276' environ = None http_port = 34549 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2f3e7a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34549 jp_logging_stream = <_io.StringIO object at 0x7f21b3047a00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_defa0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_defa0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_defa0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--gateway-url=http://mock-gateway-server:8889'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--gateway-url=http://mock-gateway-server:8889'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--gateway-url=http://mock-gateway-server:8889'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2fd0af0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:47.925 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_defa0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_defa0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_defa0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_defa0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_defa0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_defa0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'url': 'http://mock-gateway-server:8889'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_defa0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_defa0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_defa0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'url': 'http://mock-gateway-server:8889'}} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'url': 'http://mock-gateway-server:8889'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_defa0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_defa0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_defa0/config/jupyter_server_config.json ____________________ test_token_renewer_config[custom-None] ____________________ jp_server_config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2f3f7e0> renewer_type = 'custom', initial_auth_token = None @pytest.mark.parametrize( "renewer_type,initial_auth_token", [("default", ""), ("custom", None), ("custom", "")] ) def test_token_renewer_config( jp_server_config, jp_configurable_serverapp, renewer_type, initial_auth_token ): argv = ["--gateway-url=" + mock_gateway_url] if renewer_type == "custom": argv.append( "--GatewayClient.gateway_token_renewer_class=tests.test_gateway.CustomTestTokenRenewer" ) if initial_auth_token is None: argv.append("--GatewayClient.auth_token=None") GatewayClient.clear_instance() > app = jp_configurable_serverapp(argv=argv) argv = ['--gateway-url=http://mock-gateway-server:8889', '--GatewayClient.gateway_token_renewer_class=tests.test_gateway.CustomTestTokenRenewer', '--GatewayClient.auth_token=None'] initial_auth_token = None jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2f3f7e0> jp_server_config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} renewer_type = 'custom' tests/test_gateway.py:323: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--gateway-url=http://mock-gateway-server:8889', '--GatewayClient.gateway_token_renewer_class=tests.test_gateway.CustomTestTokenRenewer', '--GatewayClient.auth_token=None'] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '5e326374' environ = None http_port = 43073 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2f3f920> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43073 jp_logging_stream = <_io.StringIO object at 0x7f21b3047340> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--gateway-url=http://mock-gateway-server:8889', '--GatewayClient.gateway_token_renewer_class=tests.test_gateway.CustomTestTokenRenewer', '--GatewayClient.auth_token=None'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--gateway-url=http://mock-gateway-server:8889', '--GatewayClient.gateway_token_renewer_class=tests.test_gateway.CustomTestTokenRenewer', '--GatewayClient.auth_token=None'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--gateway-url=http://mock-gateway-server:8889', '--GatewayClient.gateway_token_renewer_class=tests.test_gateway.CustomTestTokenRenewer', '--GatewayClient.auth_token=None'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b7d3d900> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:48.022 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'url': 'http://mock-gateway-server:8889', 'gateway_token_renewer_class': 'tests.test_gateway.CustomTestTokenRenewer', 'auth_token': None}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'url': 'http://mock-gateway-server:8889', 'gateway_token_renewer_class': 'tests.test_gateway.CustomTestTokenRenewer', 'auth_token': None}} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'url': 'http://mock-gateway-server:8889', 'gateway_token_renewer_class': 'tests.test_gateway.CustomTestTokenRenewer', 'auth_token': None}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust0/config/jupyter_server_config.json ______________________ test_token_renewer_config[custom-] ______________________ jp_server_config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2f3e8e0> renewer_type = 'custom', initial_auth_token = '' @pytest.mark.parametrize( "renewer_type,initial_auth_token", [("default", ""), ("custom", None), ("custom", "")] ) def test_token_renewer_config( jp_server_config, jp_configurable_serverapp, renewer_type, initial_auth_token ): argv = ["--gateway-url=" + mock_gateway_url] if renewer_type == "custom": argv.append( "--GatewayClient.gateway_token_renewer_class=tests.test_gateway.CustomTestTokenRenewer" ) if initial_auth_token is None: argv.append("--GatewayClient.auth_token=None") GatewayClient.clear_instance() > app = jp_configurable_serverapp(argv=argv) argv = ['--gateway-url=http://mock-gateway-server:8889', '--GatewayClient.gateway_token_renewer_class=tests.test_gateway.CustomTestTokenRenewer'] initial_auth_token = '' jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2f3e8e0> jp_server_config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} renewer_type = 'custom' tests/test_gateway.py:323: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--gateway-url=http://mock-gateway-server:8889', '--GatewayClient.gateway_token_renewer_class=tests.test_gateway.CustomTestTokenRenewer'] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '77772188' environ = None http_port = 36627 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2f3d440> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36627 jp_logging_stream = <_io.StringIO object at 0x7f21b3046bc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--gateway-url=http://mock-gateway-server:8889', '--GatewayClient.gateway_token_renewer_class=tests.test_gateway.CustomTestTokenRenewer'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--gateway-url=http://mock-gateway-server:8889', '--GatewayClient.gateway_token_renewer_class=tests.test_gateway.CustomTestTokenRenewer'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--gateway-url=http://mock-gateway-server:8889', '--GatewayClient.gateway_token_renewer_class=tests.test_gateway.CustomTestTokenRenewer'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2f7e2b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:48.126 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust1/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'url': 'http://mock-gateway-server:8889', 'gateway_token_renewer_class': 'tests.test_gateway.CustomTestTokenRenewer'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust1/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'url': 'http://mock-gateway-server:8889', 'gateway_token_renewer_class': 'tests.test_gateway.CustomTestTokenRenewer'}} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'url': 'http://mock-gateway-server:8889', 'gateway_token_renewer_class': 'tests.test_gateway.CustomTestTokenRenewer'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_token_renewer_config_cust1/config/jupyter_server_config.json _____________ test_gateway_request_timeout_pad_option[50-10-50-45] _____________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2f3d940> monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b2fbbee0> request_timeout = 50, kernel_launch_timeout = 10, expected_request_timeout = 50 expected_kernel_launch_timeout = 45 @pytest.mark.parametrize( "request_timeout,kernel_launch_timeout,expected_request_timeout,expected_kernel_launch_timeout", [(50, 10, 50, 45), (10, 50, 55, 50)], ) def test_gateway_request_timeout_pad_option( jp_configurable_serverapp, monkeypatch, request_timeout, kernel_launch_timeout, expected_request_timeout, expected_kernel_launch_timeout, ): argv = [ f"--GatewayClient.request_timeout={request_timeout}", "--GatewayClient.launch_timeout_pad=5", ] GatewayClient.clear_instance() > app = jp_configurable_serverapp(argv=argv) argv = ['--GatewayClient.request_timeout=50', '--GatewayClient.launch_timeout_pad=5'] expected_kernel_launch_timeout = 45 expected_request_timeout = 50 jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2f3d940> kernel_launch_timeout = 10 monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b2fbbee0> request_timeout = 50 tests/test_gateway.py:367: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--GatewayClient.request_timeout=50', '--GatewayClient.launch_timeout_pad=5'] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'caff3f32' environ = None http_port = 38239 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2f3fc40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38239 jp_logging_stream = <_io.StringIO object at 0x7f21b30477c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--GatewayClient.request_timeout=50', '--GatewayClient.launch_timeout_pad=5'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--GatewayClient.request_timeout=50', '--GatewayClient.launch_timeout_pad=5'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--GatewayClient.request_timeout=50', '--GatewayClient.launch_timeout_pad=5'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b279cf50> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:48.221 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'request_timeout': 50.0, 'launch_timeout_pad': 5.0}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'request_timeout': 50.0, 'launch_timeout_pad': 5.0}} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'request_timeout': 50.0, 'launch_timeout_pad': 5.0}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p0/config/jupyter_server_config.json _____________ test_gateway_request_timeout_pad_option[10-50-55-50] _____________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2b854e0> monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b2bd16a0> request_timeout = 10, kernel_launch_timeout = 50, expected_request_timeout = 55 expected_kernel_launch_timeout = 50 @pytest.mark.parametrize( "request_timeout,kernel_launch_timeout,expected_request_timeout,expected_kernel_launch_timeout", [(50, 10, 50, 45), (10, 50, 55, 50)], ) def test_gateway_request_timeout_pad_option( jp_configurable_serverapp, monkeypatch, request_timeout, kernel_launch_timeout, expected_request_timeout, expected_kernel_launch_timeout, ): argv = [ f"--GatewayClient.request_timeout={request_timeout}", "--GatewayClient.launch_timeout_pad=5", ] GatewayClient.clear_instance() > app = jp_configurable_serverapp(argv=argv) argv = ['--GatewayClient.request_timeout=10', '--GatewayClient.launch_timeout_pad=5'] expected_kernel_launch_timeout = 50 expected_request_timeout = 55 jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2b854e0> kernel_launch_timeout = 50 monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f21b2bd16a0> request_timeout = 10 tests/test_gateway.py:367: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--GatewayClient.request_timeout=10', '--GatewayClient.launch_timeout_pad=5'] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '2c65df45' environ = None http_port = 35779 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2b85760> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35779 jp_logging_stream = <_io.StringIO object at 0x7f21b2fa4ac0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--GatewayClient.request_timeout=10', '--GatewayClient.launch_timeout_pad=5'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--GatewayClient.request_timeout=10', '--GatewayClient.launch_timeout_pad=5'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--GatewayClient.request_timeout=10', '--GatewayClient.launch_timeout_pad=5'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2fd0140> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:48.327 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p1/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'request_timeout': 10.0, 'launch_timeout_pad': 5.0}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p1/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'request_timeout': 10.0, 'launch_timeout_pad': 5.0}} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'request_timeout': 10.0, 'launch_timeout_pad': 5.0}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_timeout_p1/config/jupyter_server_config.json _ test_gateway_request_with_expiring_cookies[False-None-None-EXISTING=1-False] _ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2b85d00> accept_cookies = False, expire_arg = None, expire_param = None existing_cookies = 'EXISTING=1', cookie_exists = False @pytest.mark.parametrize( "accept_cookies,expire_arg,expire_param,existing_cookies,cookie_exists", [ (False, None, None, "EXISTING=1", False), (True, None, None, "EXISTING=1", True), (True, "Expires", 180, None, True), (True, "Max-Age", "-360", "EXISTING=1", False), ], ) def test_gateway_request_with_expiring_cookies( jp_configurable_serverapp, accept_cookies, expire_arg, expire_param, existing_cookies, cookie_exists, ): argv = [f"--GatewayClient.accept_cookies={accept_cookies}"] GatewayClient.clear_instance() > _ = jp_configurable_serverapp(argv=argv) accept_cookies = False argv = ['--GatewayClient.accept_cookies=False'] cookie_exists = False existing_cookies = 'EXISTING=1' expire_arg = None expire_param = None jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2b85d00> tests/test_gateway.py:398: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--GatewayClient.accept_cookies=False'] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '12660661' environ = None http_port = 36675 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2b84cc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36675 jp_logging_stream = <_io.StringIO object at 0x7f21b2fa5480> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--GatewayClient.accept_cookies=False'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--GatewayClient.accept_cookies=False'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--GatewayClient.accept_cookies=False'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b279cdc0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:48.423 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'accept_cookies': False}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi0/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'accept_cookies': False}} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'accept_cookies': False}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi0/config/jupyter_server_config.json __ test_gateway_request_with_expiring_cookies[True-None-None-EXISTING=1-True] __ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2b86700> accept_cookies = True, expire_arg = None, expire_param = None existing_cookies = 'EXISTING=1', cookie_exists = True @pytest.mark.parametrize( "accept_cookies,expire_arg,expire_param,existing_cookies,cookie_exists", [ (False, None, None, "EXISTING=1", False), (True, None, None, "EXISTING=1", True), (True, "Expires", 180, None, True), (True, "Max-Age", "-360", "EXISTING=1", False), ], ) def test_gateway_request_with_expiring_cookies( jp_configurable_serverapp, accept_cookies, expire_arg, expire_param, existing_cookies, cookie_exists, ): argv = [f"--GatewayClient.accept_cookies={accept_cookies}"] GatewayClient.clear_instance() > _ = jp_configurable_serverapp(argv=argv) accept_cookies = True argv = ['--GatewayClient.accept_cookies=True'] cookie_exists = True existing_cookies = 'EXISTING=1' expire_arg = None expire_param = None jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2b86700> tests/test_gateway.py:398: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--GatewayClient.accept_cookies=True'] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '976b7c44' environ = None http_port = 35331 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2b85620> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35331 jp_logging_stream = <_io.StringIO object at 0x7f21b2fa44c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--GatewayClient.accept_cookies=True'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--GatewayClient.accept_cookies=True'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--GatewayClient.accept_cookies=True'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2b1adf0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:48.523 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi1/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'accept_cookies': True}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi1/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'accept_cookies': True}} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'accept_cookies': True}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi1/config/jupyter_server_config.json ____ test_gateway_request_with_expiring_cookies[True-Expires-180-None-True] ____ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2b87100> accept_cookies = True, expire_arg = 'Expires', expire_param = 180 existing_cookies = None, cookie_exists = True @pytest.mark.parametrize( "accept_cookies,expire_arg,expire_param,existing_cookies,cookie_exists", [ (False, None, None, "EXISTING=1", False), (True, None, None, "EXISTING=1", True), (True, "Expires", 180, None, True), (True, "Max-Age", "-360", "EXISTING=1", False), ], ) def test_gateway_request_with_expiring_cookies( jp_configurable_serverapp, accept_cookies, expire_arg, expire_param, existing_cookies, cookie_exists, ): argv = [f"--GatewayClient.accept_cookies={accept_cookies}"] GatewayClient.clear_instance() > _ = jp_configurable_serverapp(argv=argv) accept_cookies = True argv = ['--GatewayClient.accept_cookies=True'] cookie_exists = True existing_cookies = None expire_arg = 'Expires' expire_param = 180 jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2b87100> tests/test_gateway.py:398: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--GatewayClient.accept_cookies=True'] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '1c6ffc94' environ = None http_port = 40137 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2b85b20> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40137 jp_logging_stream = <_io.StringIO object at 0x7f21b2fa5840> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--GatewayClient.accept_cookies=True'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--GatewayClient.accept_cookies=True'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--GatewayClient.accept_cookies=True'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b279fcf0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:48.618 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi2/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'accept_cookies': True}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi2/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'accept_cookies': True}} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'accept_cookies': True}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi2/config/jupyter_server_config.json _ test_gateway_request_with_expiring_cookies[True-Max-Age--360-EXISTING=1-False] _ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2b87b00> accept_cookies = True, expire_arg = 'Max-Age', expire_param = '-360' existing_cookies = 'EXISTING=1', cookie_exists = False @pytest.mark.parametrize( "accept_cookies,expire_arg,expire_param,existing_cookies,cookie_exists", [ (False, None, None, "EXISTING=1", False), (True, None, None, "EXISTING=1", True), (True, "Expires", 180, None, True), (True, "Max-Age", "-360", "EXISTING=1", False), ], ) def test_gateway_request_with_expiring_cookies( jp_configurable_serverapp, accept_cookies, expire_arg, expire_param, existing_cookies, cookie_exists, ): argv = [f"--GatewayClient.accept_cookies={accept_cookies}"] GatewayClient.clear_instance() > _ = jp_configurable_serverapp(argv=argv) accept_cookies = True argv = ['--GatewayClient.accept_cookies=True'] cookie_exists = False existing_cookies = 'EXISTING=1' expire_arg = 'Max-Age' expire_param = '-360' jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2b87b00> tests/test_gateway.py:398: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--GatewayClient.accept_cookies=True'] base_url = '/a%40b/' c = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '2b70dce8' environ = None http_port = 40967 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2b865c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40967 jp_logging_stream = <_io.StringIO object at 0x7f21b2fa4a00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--GatewayClient.accept_cookies=True'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--GatewayClient.accept_cookies=True'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--GatewayClient.accept_cookies=True'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2b18ff0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:48.714 ServerApp] Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi3/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'accept_cookies': True}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi3/config DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'accept_cookies': True}} DEBUG ServerApp:application.py:457 Config changed: {'CustomTestTokenRenewer': {'config_var_1': 42, 'config_var_2': 'Use this token value: '}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'GatewayClient': {'accept_cookies': True}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_gateway_request_with_expi3/config/jupyter_server_config.json ____________________________ test_server_list[json] ____________________________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3188900> capsys = <_pytest.capture.CaptureFixture object at 0x7f21b31674d0> format = 'json' @pytest.mark.parametrize( "format", [ "json", "jsonlist", "", ], ) def test_server_list(jp_configurable_serverapp, capsys, format): > app = jp_configurable_serverapp(log=logging.getLogger()) capsys = <_pytest.capture.CaptureFixture object at 0x7f21b31674d0> format = 'json' jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b3188900> tests/test_serverapp.py:54: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'eb7c9eb0' environ = None http_port = 38927 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b318a480> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38927 jp_logging_stream = <_io.StringIO object at 0x7f21b2b77dc0> kwargs = {'log': , 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_server_list_json_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_server_list_json_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_server_list_json_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3177ed0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:52.140 ServerApp] Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_server_list_json_0/etc/jupyter/jupyter_server_config.json [D 2024-12-18 10:42:52.141 ServerApp] Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_server_list_json_0/env/etc/jupyter/jupyter_server_config.json [D 2024-12-18 10:42:52.141 ServerApp] Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json [D 2024-12-18 10:42:52.141 ServerApp] Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_server_list_json_0/config/jupyter_server_config.json __________________________ test_server_list[jsonlist] __________________________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b318af20> capsys = <_pytest.capture.CaptureFixture object at 0x7f21b27d0cd0> format = 'jsonlist' @pytest.mark.parametrize( "format", [ "json", "jsonlist", "", ], ) def test_server_list(jp_configurable_serverapp, capsys, format): > app = jp_configurable_serverapp(log=logging.getLogger()) capsys = <_pytest.capture.CaptureFixture object at 0x7f21b27d0cd0> format = 'jsonlist' jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b318af20> tests/test_serverapp.py:54: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '892fb5c4' environ = None http_port = 35325 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b318afc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35325 jp_logging_stream = <_io.StringIO object at 0x7f21b31ac4c0> kwargs = {'log': , 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_server_list_jsonlist_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_server_list_jsonlist_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_server_list_jsonlist_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3177890> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:52.231 ServerApp] Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_server_list_jsonlist_0/etc/jupyter/jupyter_server_config.json [D 2024-12-18 10:42:52.231 ServerApp] Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_server_list_jsonlist_0/env/etc/jupyter/jupyter_server_config.json [D 2024-12-18 10:42:52.231 ServerApp] Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json [D 2024-12-18 10:42:52.231 ServerApp] Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_server_list_jsonlist_0/config/jupyter_server_config.json ______________________________ test_server_list[] ______________________________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b318bd80> capsys = <_pytest.capture.CaptureFixture object at 0x7f21b319ba80>, format = '' @pytest.mark.parametrize( "format", [ "json", "jsonlist", "", ], ) def test_server_list(jp_configurable_serverapp, capsys, format): > app = jp_configurable_serverapp(log=logging.getLogger()) capsys = <_pytest.capture.CaptureFixture object at 0x7f21b319ba80> format = '' jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b318bd80> tests/test_serverapp.py:54: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '2cc5a543' environ = None http_port = 41943 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2730180> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41943 jp_logging_stream = <_io.StringIO object at 0x7f21b31acc40> kwargs = {'log': , 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_server_list__0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_server_list__0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_server_list__0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b3175f40> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:52.323 ServerApp] Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_server_list__0/etc/jupyter/jupyter_server_config.json [D 2024-12-18 10:42:52.323 ServerApp] Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_server_list__0/env/etc/jupyter/jupyter_server_config.json [D 2024-12-18 10:42:52.323 ServerApp] Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json [D 2024-12-18 10:42:52.324 ServerApp] Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_server_list__0/config/jupyter_server_config.json ____________________________ test_server_info_file _____________________________ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_server_info_file0') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2731800> def test_server_info_file(tmp_path, jp_configurable_serverapp): > app = jp_configurable_serverapp(log=logging.getLogger()) jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2731800> tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_server_info_file0') tests/test_serverapp.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '71f69626' environ = None http_port = 36345 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b27309a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36345 jp_logging_stream = <_io.StringIO object at 0x7f21b31ac340> kwargs = {'log': , 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_server_info_file0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_server_info_file0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_server_info_file0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b31741e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:52.422 ServerApp] Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_server_info_file0/etc/jupyter/jupyter_server_config.json [D 2024-12-18 10:42:52.423 ServerApp] Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_server_info_file0/env/etc/jupyter/jupyter_server_config.json [D 2024-12-18 10:42:52.423 ServerApp] Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json [D 2024-12-18 10:42:52.423 ServerApp] Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_server_info_file0/config/jupyter_server_config.json ________________________________ test_root_dir _________________________________ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_root_dir0') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2732160> def test_root_dir(tmp_path, jp_configurable_serverapp): > app = jp_configurable_serverapp(root_dir=str(tmp_path)) jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2732160> tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_root_dir0') tests/test_serverapp.py:108: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '854f94e8' environ = None http_port = 40385 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2730d60> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40385 jp_logging_stream = <_io.StringIO object at 0x7f21b31ac700> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_root_dir0'} root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_root_dir0' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_root_dir0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2793cf0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:52.505 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_root_dir0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_root_dir0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_root_dir0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_root_dir0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_root_dir0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_root_dir0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_root_dir0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_root_dir0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_root_dir0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_root_dir0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_root_dir0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_root_dir0/config/jupyter_server_config.json ___________________ test_invalid_root_dir[invalid_root_dir0] ___________________ invalid_root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_0/notebooks' jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2732ac0> def test_invalid_root_dir(invalid_root_dir, jp_configurable_serverapp): > app = jp_configurable_serverapp() invalid_root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_0/notebooks' jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2732ac0> tests/test_serverapp.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '05346ba0' environ = None http_port = 45073 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2731120> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45073 jp_logging_stream = <_io.StringIO object at 0x7f21b31ad3c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2792490> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:52.594 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_0/config/jupyter_server_config.json ___________________ test_invalid_root_dir[invalid_root_dir1] ___________________ invalid_root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_1/root/dir/is/missing' jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2733380> def test_invalid_root_dir(invalid_root_dir, jp_configurable_serverapp): > app = jp_configurable_serverapp() invalid_root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_1/root/dir/is/missing' jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2733380> tests/test_serverapp.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '363e9d7a' environ = None http_port = 36557 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b27334c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36557 jp_logging_stream = <_io.StringIO object at 0x7f21b31ad300> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b27934d0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:52.685 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_1/config/jupyter_server_config.json ___________________ test_invalid_root_dir[invalid_root_dir2] ___________________ invalid_root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_2/test.txt' jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2733d80> def test_invalid_root_dir(invalid_root_dir, jp_configurable_serverapp): > app = jp_configurable_serverapp() invalid_root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_2/test.txt' jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2733d80> tests/test_serverapp.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '31f9e215' environ = None http_port = 44483 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2733ec0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44483 jp_logging_stream = <_io.StringIO object at 0x7f21b31ad000> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b274e210> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:52.775 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_invalid_root_dir_invalid_2/config/jupyter_server_config.json _____________________ test_valid_root_dir[valid_root_dir0] _____________________ valid_root_dir = '/' jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2731940> def test_valid_root_dir(valid_root_dir, jp_configurable_serverapp): > app = jp_configurable_serverapp(root_dir=valid_root_dir) jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2731940> valid_root_dir = '/' tests/test_serverapp.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'e574674f' environ = None http_port = 39755 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2732ca0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39755 jp_logging_stream = <_io.StringIO object at 0x7f21b31ae080> kwargs = {'root_dir': '/'} root_dir = '/' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b27921c0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:52.868 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root0/config/jupyter_server_config.json _____________________ test_valid_root_dir[valid_root_dir1] _____________________ valid_root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root1/first-level' jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b27e4220> def test_valid_root_dir(valid_root_dir, jp_configurable_serverapp): > app = jp_configurable_serverapp(root_dir=valid_root_dir) jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b27e4220> valid_root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root1/first-level' tests/test_serverapp.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '7e5c1ff7' environ = None http_port = 42849 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b27e4400> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42849 jp_logging_stream = <_io.StringIO object at 0x7f21b31adfc0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root1/first-level'} root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root1/first-level' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b274fcf0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:52.956 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root1/config/jupyter_server_config.json _____________________ test_valid_root_dir[valid_root_dir2] _____________________ valid_root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root2/first-level/second-level' jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b27e5a80> def test_valid_root_dir(valid_root_dir, jp_configurable_serverapp): > app = jp_configurable_serverapp(root_dir=valid_root_dir) jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b27e5a80> valid_root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root2/first-level/second-level' tests/test_serverapp.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'becf5dde' environ = None http_port = 43603 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b27e5bc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43603 jp_logging_stream = <_io.StringIO object at 0x7f21b31adf00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root2/first-level/second-level'} root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root2/first-level/second-level' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b274dd10> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:53.050 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_valid_root_dir_valid_root2/config/jupyter_server_config.json _____________________________ test_generate_config _____________________________ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_generate_config0') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b27e6520> async def test_generate_config(tmp_path, jp_configurable_serverapp): > app = jp_configurable_serverapp(config_dir=str(tmp_path)) jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b27e6520> tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_generate_config0') tests/test_serverapp.py:148: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:213: in _configurable_serverapp app.initialize(argv=argv, new_httpserver=False) app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'b2d2f1fe' environ = None http_port = 35207 jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35207 jp_logging_stream = <_io.StringIO object at 0x7f21b31af100> kwargs = {'config_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_generate_config0', 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_generate_config0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_generate_config0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_generate_config0') /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b276fc50> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:53.136 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_generate_config0', '/tmp/pytest-of-mockbuild/pytest-0/test_generate_config0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_generate_config0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_generate_config0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_generate_config0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_generate_config0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_generate_config0/config DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_generate_config0 DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_generate_config0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_generate_config0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_generate_config0/config DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_generate_config0 DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_generate_config0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_generate_config0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_generate_config0/config/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_generate_config0/jupyter_server_config.json _____________________________ test_server_password _____________________________ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_server_password0') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b27e6980> def test_server_password(tmp_path, jp_configurable_serverapp): password = "secret" with patch.dict("os.environ", {"JUPYTER_CONFIG_DIR": str(tmp_path)}), patch.object( getpass, "getpass", return_value=password ): app = JupyterPasswordApp(log_level=logging.ERROR) app.initialize([]) app.start() > sv = jp_configurable_serverapp() app = jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b27e6980> password = 'secret' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_server_password0') tests/test_serverapp.py:163: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'e33d9d61' environ = None http_port = 44977 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b27e4ea0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44977 jp_logging_stream = <_io.StringIO object at 0x7f21b31af580> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_server_password0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_server_password0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_server_password0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b276f660> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:53.531 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_server_password0', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_server_password0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_server_password0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_server_password0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_server_password0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_server_password0 DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_server_password0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_server_password0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_server_password0 DEBUG ServerApp:application.py:929 Loaded config file: /tmp/pytest-of-mockbuild/pytest-0/test_server_password0/jupyter_server_config.json DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': , 'hashed_password': 'argon2:$argon2id$v=19$m=10240,t=10,p=8$G1hjdkjBoj/f9sTtelBgkg$43ecDQuxorOF6mcWnao0f3C6gVShMGz1JIsmUqxrurE'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_server_password0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_server_password0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_server_password0/jupyter_server_config.json _________________ test_allow_unauthenticated_env_var[yes-True] _________________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b27e74c0> env = 'yes', expected = True @pytest.mark.parametrize( "env,expected", [ ["yes", True], ["Yes", True], ["True", True], ["true", True], ["TRUE", True], ["no", False], ["nooo", False], ["FALSE", False], ["false", False], ], ) def test_allow_unauthenticated_env_var(jp_configurable_serverapp, env, expected): with patch.dict("os.environ", {"JUPYTER_SERVER_ALLOW_UNAUTHENTICATED_ACCESS": env}): > app = jp_configurable_serverapp() env = 'yes' expected = True jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b27e74c0> tests/test_serverapp.py:185: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '8333c490' environ = None http_port = 44799 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b27e6020> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44799 jp_logging_stream = <_io.StringIO object at 0x7f21b31aec80> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2752b20> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:53.622 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env0/config/jupyter_server_config.json _________________ test_allow_unauthenticated_env_var[Yes-True] _________________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b27e5620> env = 'Yes', expected = True @pytest.mark.parametrize( "env,expected", [ ["yes", True], ["Yes", True], ["True", True], ["true", True], ["TRUE", True], ["no", False], ["nooo", False], ["FALSE", False], ["false", False], ], ) def test_allow_unauthenticated_env_var(jp_configurable_serverapp, env, expected): with patch.dict("os.environ", {"JUPYTER_SERVER_ALLOW_UNAUTHENTICATED_ACCESS": env}): > app = jp_configurable_serverapp() env = 'Yes' expected = True jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b27e5620> tests/test_serverapp.py:185: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '09ecfb6c' environ = None http_port = 45601 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b27e6e80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45601 jp_logging_stream = <_io.StringIO object at 0x7f21b31ad840> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b274cdc0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:53.718 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env1/config/jupyter_server_config.json ________________ test_allow_unauthenticated_env_var[True-True] _________________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b27e7380> env = 'True', expected = True @pytest.mark.parametrize( "env,expected", [ ["yes", True], ["Yes", True], ["True", True], ["true", True], ["TRUE", True], ["no", False], ["nooo", False], ["FALSE", False], ["false", False], ], ) def test_allow_unauthenticated_env_var(jp_configurable_serverapp, env, expected): with patch.dict("os.environ", {"JUPYTER_SERVER_ALLOW_UNAUTHENTICATED_ACCESS": env}): > app = jp_configurable_serverapp() env = 'True' expected = True jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b27e7380> tests/test_serverapp.py:185: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'bdfd75c0' environ = None http_port = 35245 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2954040> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35245 jp_logging_stream = <_io.StringIO object at 0x7f21b31ae2c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env2/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env2/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2751f90> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:53.810 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env2/config/jupyter_server_config.json ________________ test_allow_unauthenticated_env_var[true-True] _________________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b29554e0> env = 'true', expected = True @pytest.mark.parametrize( "env,expected", [ ["yes", True], ["Yes", True], ["True", True], ["true", True], ["TRUE", True], ["no", False], ["nooo", False], ["FALSE", False], ["false", False], ], ) def test_allow_unauthenticated_env_var(jp_configurable_serverapp, env, expected): with patch.dict("os.environ", {"JUPYTER_SERVER_ALLOW_UNAUTHENTICATED_ACCESS": env}): > app = jp_configurable_serverapp() env = 'true' expected = True jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b29554e0> tests/test_serverapp.py:185: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '020c744d' environ = None http_port = 35627 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b29556c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35627 jp_logging_stream = <_io.StringIO object at 0x7f21b27f8700> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env3/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env3/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b276f200> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:53.902 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env3/config/jupyter_server_config.json ________________ test_allow_unauthenticated_env_var[TRUE-True] _________________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2955e40> env = 'TRUE', expected = True @pytest.mark.parametrize( "env,expected", [ ["yes", True], ["Yes", True], ["True", True], ["true", True], ["TRUE", True], ["no", False], ["nooo", False], ["FALSE", False], ["false", False], ], ) def test_allow_unauthenticated_env_var(jp_configurable_serverapp, env, expected): with patch.dict("os.environ", {"JUPYTER_SERVER_ALLOW_UNAUTHENTICATED_ACCESS": env}): > app = jp_configurable_serverapp() env = 'TRUE' expected = True jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2955e40> tests/test_serverapp.py:185: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '84dcb5ba' environ = None http_port = 34223 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2956020> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34223 jp_logging_stream = <_io.StringIO object at 0x7f21b27f9540> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env4/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env4/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b252dc20> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:54.004 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env4/config/jupyter_server_config.json _________________ test_allow_unauthenticated_env_var[no-False] _________________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2956840> env = 'no', expected = False @pytest.mark.parametrize( "env,expected", [ ["yes", True], ["Yes", True], ["True", True], ["true", True], ["TRUE", True], ["no", False], ["nooo", False], ["FALSE", False], ["false", False], ], ) def test_allow_unauthenticated_env_var(jp_configurable_serverapp, env, expected): with patch.dict("os.environ", {"JUPYTER_SERVER_ALLOW_UNAUTHENTICATED_ACCESS": env}): > app = jp_configurable_serverapp() env = 'no' expected = False jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2956840> tests/test_serverapp.py:185: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '5b7990c0' environ = None http_port = 41081 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2954f40> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41081 jp_logging_stream = <_io.StringIO object at 0x7f21b27f9180> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env5/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env5/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2751180> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:54.095 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env5/config/jupyter_server_config.json ________________ test_allow_unauthenticated_env_var[nooo-False] ________________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b29571a0> env = 'nooo', expected = False @pytest.mark.parametrize( "env,expected", [ ["yes", True], ["Yes", True], ["True", True], ["true", True], ["TRUE", True], ["no", False], ["nooo", False], ["FALSE", False], ["false", False], ], ) def test_allow_unauthenticated_env_var(jp_configurable_serverapp, env, expected): with patch.dict("os.environ", {"JUPYTER_SERVER_ALLOW_UNAUTHENTICATED_ACCESS": env}): > app = jp_configurable_serverapp() env = 'nooo' expected = False jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b29571a0> tests/test_serverapp.py:185: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'ad9ad80b' environ = None http_port = 33919 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b29558a0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33919 jp_logging_stream = <_io.StringIO object at 0x7f21b27f9840> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env6/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env6/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env6') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b252de50> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:54.190 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env6/config/jupyter_server_config.json _______________ test_allow_unauthenticated_env_var[FALSE-False] ________________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2957b00> env = 'FALSE', expected = False @pytest.mark.parametrize( "env,expected", [ ["yes", True], ["Yes", True], ["True", True], ["true", True], ["TRUE", True], ["no", False], ["nooo", False], ["FALSE", False], ["false", False], ], ) def test_allow_unauthenticated_env_var(jp_configurable_serverapp, env, expected): with patch.dict("os.environ", {"JUPYTER_SERVER_ALLOW_UNAUTHENTICATED_ACCESS": env}): > app = jp_configurable_serverapp() env = 'FALSE' expected = False jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2957b00> tests/test_serverapp.py:185: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '93ffbc92' environ = None http_port = 44023 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2956200> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44023 jp_logging_stream = <_io.StringIO object at 0x7f21b27f8d00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env7/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env7/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b29167b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:54.280 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env7/config/jupyter_server_config.json _______________ test_allow_unauthenticated_env_var[false-False] ________________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2954e00> env = 'false', expected = False @pytest.mark.parametrize( "env,expected", [ ["yes", True], ["Yes", True], ["True", True], ["true", True], ["TRUE", True], ["no", False], ["nooo", False], ["FALSE", False], ["false", False], ], ) def test_allow_unauthenticated_env_var(jp_configurable_serverapp, env, expected): with patch.dict("os.environ", {"JUPYTER_SERVER_ALLOW_UNAUTHENTICATED_ACCESS": env}): > app = jp_configurable_serverapp() env = 'false' expected = False jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2954e00> tests/test_serverapp.py:185: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '198f581c' environ = None http_port = 33471 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2957240> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33471 jp_logging_stream = <_io.StringIO object at 0x7f21b27f87c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env8/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env8/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env8') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2915cc0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:54.373 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env8/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env8/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env8/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env8/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env8/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_allow_unauthenticated_env8/config/jupyter_server_config.json ___________________________ test_valid_preferred_dir ___________________________ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir0') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b29c63e0> @pytest.mark.filterwarnings("ignore::FutureWarning") def test_valid_preferred_dir(tmp_path, jp_configurable_serverapp): path = str(tmp_path) > app = jp_configurable_serverapp(root_dir=path, preferred_dir=path) jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b29c63e0> path = '/tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir0' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir0') tests/test_serverapp.py:349: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '54704fb4' environ = None http_port = 40121 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b29c5ee0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40121 jp_logging_stream = <_io.StringIO object at 0x7f21b27f9cc0> kwargs = {'preferred_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir0', 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir0'} root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir0' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2916cb0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:54.607 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir0/config/jupyter_server_config.json ___________________ test_valid_preferred_dir_is_root_subdir ____________________ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir_is_ro0') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b29c7ec0> @pytest.mark.filterwarnings("ignore::FutureWarning") def test_valid_preferred_dir_is_root_subdir(tmp_path, jp_configurable_serverapp): path = str(tmp_path) path_subdir = str(tmp_path / "subdir") os.makedirs(path_subdir, exist_ok=True) > app = jp_configurable_serverapp(root_dir=path, preferred_dir=path_subdir) jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b29c7ec0> path = '/tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir_is_ro0' path_subdir = '/tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir_is_ro0/subdir' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir_is_ro0') tests/test_serverapp.py:362: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '7ce6a5ec' environ = None http_port = 33327 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b29c7420> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33327 jp_logging_stream = <_io.StringIO object at 0x7f21b27f8880> kwargs = {'preferred_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir_is_ro0/subdir', 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir_is_ro0'} root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir_is_ro0' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir_is_ro0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2915bd0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:54.705 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir_is_ro0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir_is_ro0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir_is_ro0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir_is_ro0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir_is_ro0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir_is_ro0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir_is_ro0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir_is_ro0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir_is_ro0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir_is_ro0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir_is_ro0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_valid_preferred_dir_is_ro0/config/jupyter_server_config.json ______ test_preferred_dir_validation_sync_regression[FileContentsManager] ______ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_0') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b25500e0> jp_file_contents_manager_class = @pytest.mark.filterwarnings("ignore::DeprecationWarning") def test_preferred_dir_validation_sync_regression( tmp_path, jp_configurable_serverapp, jp_file_contents_manager_class ): path = str(tmp_path) path_subdir = str(tmp_path / "subdir") os.makedirs(path_subdir, exist_ok=True) > app = jp_configurable_serverapp( root_dir=path, contents_manager_class=jp_file_contents_manager_class, ) jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b25500e0> jp_file_contents_manager_class = path = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_0' path_subdir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_0/subdir' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_0') tests/test_serverapp.py:385: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '085aceb0' environ = None http_port = 42065 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b25502c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42065 jp_logging_stream = <_io.StringIO object at 0x7f21b27fb700> kwargs = {'contents_manager_class': , 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_0'} root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_0' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b296b6b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:54.805 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_0/config/jupyter_server_config.json ___ test_preferred_dir_validation_sync_regression[AsyncFileContentsManager] ____ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_1') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2551260> jp_file_contents_manager_class = @pytest.mark.filterwarnings("ignore::DeprecationWarning") def test_preferred_dir_validation_sync_regression( tmp_path, jp_configurable_serverapp, jp_file_contents_manager_class ): path = str(tmp_path) path_subdir = str(tmp_path / "subdir") os.makedirs(path_subdir, exist_ok=True) > app = jp_configurable_serverapp( root_dir=path, contents_manager_class=jp_file_contents_manager_class, ) jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2551260> jp_file_contents_manager_class = path = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_1' path_subdir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_1/subdir' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_1') tests/test_serverapp.py:385: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '55741588' environ = None http_port = 36601 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2551620> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36601 jp_logging_stream = <_io.StringIO object at 0x7f21b27f90c0> kwargs = {'contents_manager_class': , 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_1'} root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_1' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b296a080> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:54.901 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_1/config/jupyter_server_config.json _______________ test_preferred_dir_validation[cli-cli-ServerApp] _______________ root_dir_loc = 'cli', preferred_dir_loc = 'cli', config_target = 'ServerApp' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2') jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2551f80> @pytest.mark.filterwarnings("ignore::FutureWarning") @pytest.mark.parametrize( "root_dir_loc,preferred_dir_loc,config_target", [ ("cli", "cli", "ServerApp"), ("cli", "cli", "FileContentsManager"), ("cli", "config", "ServerApp"), ("cli", "config", "FileContentsManager"), ("cli", "default", "ServerApp"), ("cli", "default", "FileContentsManager"), ("config", "cli", "ServerApp"), ("config", "cli", "FileContentsManager"), ("config", "config", "ServerApp"), ("config", "config", "FileContentsManager"), ("config", "default", "ServerApp"), ("config", "default", "FileContentsManager"), ("default", "cli", "ServerApp"), ("default", "cli", "FileContentsManager"), ("default", "config", "ServerApp"), ("default", "config", "FileContentsManager"), ("default", "default", "ServerApp"), ("default", "default", "FileContentsManager"), ], ) def test_preferred_dir_validation( root_dir_loc, preferred_dir_loc, config_target, tmp_path, jp_config_dir, jp_configurable_serverapp, ): expected_root_dir = str(tmp_path) os_preferred_dir = str(tmp_path / "subdir") os.makedirs(os_preferred_dir, exist_ok=True) config_preferred_dir = os_preferred_dir if config_target == "ServerApp" else "subdir" config_preferred_dir = config_preferred_dir + "/" # add trailing slash to ensure it is removed expected_preferred_dir = "subdir" argv = [] kwargs = {"root_dir": None} config_lines = [] config_file = None if root_dir_loc == "config" or preferred_dir_loc == "config": config_file = jp_config_dir.joinpath("jupyter_server_config.py") if root_dir_loc == "cli": argv.append(f"--{config_target}.root_dir={expected_root_dir}") if root_dir_loc == "config": config_lines.append(f'c.{config_target}.root_dir = r"{expected_root_dir}"') if root_dir_loc == "default": expected_root_dir = os.getcwd() if preferred_dir_loc == "cli": argv.append(f"--{config_target}.preferred_dir={config_preferred_dir}") if preferred_dir_loc == "config": config_lines.append(f'c.{config_target}.preferred_dir = r"{config_preferred_dir}"') if preferred_dir_loc == "default": expected_preferred_dir = "" if config_file is not None: config_file.write_text("\n".join(config_lines)) if argv: kwargs["argv"] = argv # type:ignore[assignment] if root_dir_loc == "default" and preferred_dir_loc != "default": # error expected with pytest.raises(SystemExit): jp_configurable_serverapp(**kwargs) else: > app = jp_configurable_serverapp(**kwargs) argv = ['--ServerApp.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2', '--ServerApp.preferred_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/subdir/'] config_file = None config_lines = [] config_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/subdir/' config_target = 'ServerApp' expected_preferred_dir = 'subdir' expected_root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2' jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2551f80> kwargs = {'argv': ['--ServerApp.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2', '--ServerApp.preferred_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/subdir/'], 'root_dir': None} os_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/subdir' preferred_dir_loc = 'cli' root_dir_loc = 'cli' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2') tests/test_serverapp.py:468: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2', '--ServerApp.preferred_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/subdir/'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '93405a4b' environ = None http_port = 44605 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b25520c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44605 jp_logging_stream = <_io.StringIO object at 0x7f21b27fb400> kwargs = {} root_dir = None tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2', '--ServerApp.preferred_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/subdir/'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2', '--ServerApp.preferred_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/subdir/'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2', '--ServerApp.preferred_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/subdir/'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2968910> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:55.006 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2', 'preferred_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/subdir/'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2', 'preferred_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/subdir/'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2', 'preferred_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/subdir/'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_2/config/jupyter_server_config.json __________ test_preferred_dir_validation[cli-cli-FileContentsManager] __________ root_dir_loc = 'cli', preferred_dir_loc = 'cli' config_target = 'FileContentsManager' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3') jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2552980> @pytest.mark.filterwarnings("ignore::FutureWarning") @pytest.mark.parametrize( "root_dir_loc,preferred_dir_loc,config_target", [ ("cli", "cli", "ServerApp"), ("cli", "cli", "FileContentsManager"), ("cli", "config", "ServerApp"), ("cli", "config", "FileContentsManager"), ("cli", "default", "ServerApp"), ("cli", "default", "FileContentsManager"), ("config", "cli", "ServerApp"), ("config", "cli", "FileContentsManager"), ("config", "config", "ServerApp"), ("config", "config", "FileContentsManager"), ("config", "default", "ServerApp"), ("config", "default", "FileContentsManager"), ("default", "cli", "ServerApp"), ("default", "cli", "FileContentsManager"), ("default", "config", "ServerApp"), ("default", "config", "FileContentsManager"), ("default", "default", "ServerApp"), ("default", "default", "FileContentsManager"), ], ) def test_preferred_dir_validation( root_dir_loc, preferred_dir_loc, config_target, tmp_path, jp_config_dir, jp_configurable_serverapp, ): expected_root_dir = str(tmp_path) os_preferred_dir = str(tmp_path / "subdir") os.makedirs(os_preferred_dir, exist_ok=True) config_preferred_dir = os_preferred_dir if config_target == "ServerApp" else "subdir" config_preferred_dir = config_preferred_dir + "/" # add trailing slash to ensure it is removed expected_preferred_dir = "subdir" argv = [] kwargs = {"root_dir": None} config_lines = [] config_file = None if root_dir_loc == "config" or preferred_dir_loc == "config": config_file = jp_config_dir.joinpath("jupyter_server_config.py") if root_dir_loc == "cli": argv.append(f"--{config_target}.root_dir={expected_root_dir}") if root_dir_loc == "config": config_lines.append(f'c.{config_target}.root_dir = r"{expected_root_dir}"') if root_dir_loc == "default": expected_root_dir = os.getcwd() if preferred_dir_loc == "cli": argv.append(f"--{config_target}.preferred_dir={config_preferred_dir}") if preferred_dir_loc == "config": config_lines.append(f'c.{config_target}.preferred_dir = r"{config_preferred_dir}"') if preferred_dir_loc == "default": expected_preferred_dir = "" if config_file is not None: config_file.write_text("\n".join(config_lines)) if argv: kwargs["argv"] = argv # type:ignore[assignment] if root_dir_loc == "default" and preferred_dir_loc != "default": # error expected with pytest.raises(SystemExit): jp_configurable_serverapp(**kwargs) else: > app = jp_configurable_serverapp(**kwargs) argv = ['--FileContentsManager.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3', '--FileContentsManager.preferred_dir=subdir/'] config_file = None config_lines = [] config_preferred_dir = 'subdir/' config_target = 'FileContentsManager' expected_preferred_dir = 'subdir' expected_root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3' jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2552980> kwargs = {'argv': ['--FileContentsManager.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3', '--FileContentsManager.preferred_dir=subdir/'], 'root_dir': None} os_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3/subdir' preferred_dir_loc = 'cli' root_dir_loc = 'cli' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3') tests/test_serverapp.py:468: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--FileContentsManager.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3', '--FileContentsManager.preferred_dir=subdir/'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '4616de63' environ = None http_port = 36385 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2552ac0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36385 jp_logging_stream = <_io.StringIO object at 0x7f21b27f8280> kwargs = {} root_dir = None tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--FileContentsManager.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3', '--FileContentsManager.preferred_dir=subdir/'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--FileContentsManager.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3', '--FileContentsManager.preferred_dir=subdir/'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--FileContentsManager.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3', '--FileContentsManager.preferred_dir=subdir/'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2968aa0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:55.098 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'FileContentsManager': {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3', 'preferred_dir': 'subdir/'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'FileContentsManager': {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3', 'preferred_dir': 'subdir/'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'FileContentsManager': {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3', 'preferred_dir': 'subdir/'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_3/config/jupyter_server_config.json _____________ test_preferred_dir_validation[cli-config-ServerApp] ______________ root_dir_loc = 'cli', preferred_dir_loc = 'config', config_target = 'ServerApp' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4') jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2553380> @pytest.mark.filterwarnings("ignore::FutureWarning") @pytest.mark.parametrize( "root_dir_loc,preferred_dir_loc,config_target", [ ("cli", "cli", "ServerApp"), ("cli", "cli", "FileContentsManager"), ("cli", "config", "ServerApp"), ("cli", "config", "FileContentsManager"), ("cli", "default", "ServerApp"), ("cli", "default", "FileContentsManager"), ("config", "cli", "ServerApp"), ("config", "cli", "FileContentsManager"), ("config", "config", "ServerApp"), ("config", "config", "FileContentsManager"), ("config", "default", "ServerApp"), ("config", "default", "FileContentsManager"), ("default", "cli", "ServerApp"), ("default", "cli", "FileContentsManager"), ("default", "config", "ServerApp"), ("default", "config", "FileContentsManager"), ("default", "default", "ServerApp"), ("default", "default", "FileContentsManager"), ], ) def test_preferred_dir_validation( root_dir_loc, preferred_dir_loc, config_target, tmp_path, jp_config_dir, jp_configurable_serverapp, ): expected_root_dir = str(tmp_path) os_preferred_dir = str(tmp_path / "subdir") os.makedirs(os_preferred_dir, exist_ok=True) config_preferred_dir = os_preferred_dir if config_target == "ServerApp" else "subdir" config_preferred_dir = config_preferred_dir + "/" # add trailing slash to ensure it is removed expected_preferred_dir = "subdir" argv = [] kwargs = {"root_dir": None} config_lines = [] config_file = None if root_dir_loc == "config" or preferred_dir_loc == "config": config_file = jp_config_dir.joinpath("jupyter_server_config.py") if root_dir_loc == "cli": argv.append(f"--{config_target}.root_dir={expected_root_dir}") if root_dir_loc == "config": config_lines.append(f'c.{config_target}.root_dir = r"{expected_root_dir}"') if root_dir_loc == "default": expected_root_dir = os.getcwd() if preferred_dir_loc == "cli": argv.append(f"--{config_target}.preferred_dir={config_preferred_dir}") if preferred_dir_loc == "config": config_lines.append(f'c.{config_target}.preferred_dir = r"{config_preferred_dir}"') if preferred_dir_loc == "default": expected_preferred_dir = "" if config_file is not None: config_file.write_text("\n".join(config_lines)) if argv: kwargs["argv"] = argv # type:ignore[assignment] if root_dir_loc == "default" and preferred_dir_loc != "default": # error expected with pytest.raises(SystemExit): jp_configurable_serverapp(**kwargs) else: > app = jp_configurable_serverapp(**kwargs) argv = ['--ServerApp.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4'] config_file = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4/config/jupyter_server_config.py') config_lines = ['c.ServerApp.preferred_dir = ' 'r"/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4/subdir/"'] config_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4/subdir/' config_target = 'ServerApp' expected_preferred_dir = 'subdir' expected_root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4' jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2553380> kwargs = {'argv': ['--ServerApp.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4'], 'root_dir': None} os_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4/subdir' preferred_dir_loc = 'config' root_dir_loc = 'cli' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4') tests/test_serverapp.py:468: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'fbed5e2b' environ = None http_port = 44831 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2551a80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44831 jp_logging_stream = <_io.StringIO object at 0x7f21b25a0c40> kwargs = {} root_dir = None tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b25c0820> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:55.203 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4/config DEBUG ServerApp:application.py:929 Loaded config file: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4/config/jupyter_server_config.py DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4', 'preferred_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4/subdir/'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_4/config/jupyter_server_config.json ________ test_preferred_dir_validation[cli-config-FileContentsManager] _________ root_dir_loc = 'cli', preferred_dir_loc = 'config' config_target = 'FileContentsManager' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5') jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2553e20> @pytest.mark.filterwarnings("ignore::FutureWarning") @pytest.mark.parametrize( "root_dir_loc,preferred_dir_loc,config_target", [ ("cli", "cli", "ServerApp"), ("cli", "cli", "FileContentsManager"), ("cli", "config", "ServerApp"), ("cli", "config", "FileContentsManager"), ("cli", "default", "ServerApp"), ("cli", "default", "FileContentsManager"), ("config", "cli", "ServerApp"), ("config", "cli", "FileContentsManager"), ("config", "config", "ServerApp"), ("config", "config", "FileContentsManager"), ("config", "default", "ServerApp"), ("config", "default", "FileContentsManager"), ("default", "cli", "ServerApp"), ("default", "cli", "FileContentsManager"), ("default", "config", "ServerApp"), ("default", "config", "FileContentsManager"), ("default", "default", "ServerApp"), ("default", "default", "FileContentsManager"), ], ) def test_preferred_dir_validation( root_dir_loc, preferred_dir_loc, config_target, tmp_path, jp_config_dir, jp_configurable_serverapp, ): expected_root_dir = str(tmp_path) os_preferred_dir = str(tmp_path / "subdir") os.makedirs(os_preferred_dir, exist_ok=True) config_preferred_dir = os_preferred_dir if config_target == "ServerApp" else "subdir" config_preferred_dir = config_preferred_dir + "/" # add trailing slash to ensure it is removed expected_preferred_dir = "subdir" argv = [] kwargs = {"root_dir": None} config_lines = [] config_file = None if root_dir_loc == "config" or preferred_dir_loc == "config": config_file = jp_config_dir.joinpath("jupyter_server_config.py") if root_dir_loc == "cli": argv.append(f"--{config_target}.root_dir={expected_root_dir}") if root_dir_loc == "config": config_lines.append(f'c.{config_target}.root_dir = r"{expected_root_dir}"') if root_dir_loc == "default": expected_root_dir = os.getcwd() if preferred_dir_loc == "cli": argv.append(f"--{config_target}.preferred_dir={config_preferred_dir}") if preferred_dir_loc == "config": config_lines.append(f'c.{config_target}.preferred_dir = r"{config_preferred_dir}"') if preferred_dir_loc == "default": expected_preferred_dir = "" if config_file is not None: config_file.write_text("\n".join(config_lines)) if argv: kwargs["argv"] = argv # type:ignore[assignment] if root_dir_loc == "default" and preferred_dir_loc != "default": # error expected with pytest.raises(SystemExit): jp_configurable_serverapp(**kwargs) else: > app = jp_configurable_serverapp(**kwargs) argv = ['--FileContentsManager.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5'] config_file = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5/config/jupyter_server_config.py') config_lines = ['c.FileContentsManager.preferred_dir = r"subdir/"'] config_preferred_dir = 'subdir/' config_target = 'FileContentsManager' expected_preferred_dir = 'subdir' expected_root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5' jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2553e20> kwargs = {'argv': ['--FileContentsManager.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5'], 'root_dir': None} os_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5/subdir' preferred_dir_loc = 'config' root_dir_loc = 'cli' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5') tests/test_serverapp.py:468: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--FileContentsManager.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'a69d6c5a' environ = None http_port = 37947 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2552a20> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 37947 jp_logging_stream = <_io.StringIO object at 0x7f21b25a1000> kwargs = {} root_dir = None tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--FileContentsManager.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--FileContentsManager.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--FileContentsManager.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b25c1b80> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:55.297 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'FileContentsManager': {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5/config DEBUG ServerApp:application.py:929 Loaded config file: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5/config/jupyter_server_config.py DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'FileContentsManager': {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'FileContentsManager': {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5', 'preferred_dir': 'subdir/'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_5/config/jupyter_server_config.json _____________ test_preferred_dir_validation[cli-default-ServerApp] _____________ root_dir_loc = 'cli', preferred_dir_loc = 'default', config_target = 'ServerApp' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6') jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2553420> @pytest.mark.filterwarnings("ignore::FutureWarning") @pytest.mark.parametrize( "root_dir_loc,preferred_dir_loc,config_target", [ ("cli", "cli", "ServerApp"), ("cli", "cli", "FileContentsManager"), ("cli", "config", "ServerApp"), ("cli", "config", "FileContentsManager"), ("cli", "default", "ServerApp"), ("cli", "default", "FileContentsManager"), ("config", "cli", "ServerApp"), ("config", "cli", "FileContentsManager"), ("config", "config", "ServerApp"), ("config", "config", "FileContentsManager"), ("config", "default", "ServerApp"), ("config", "default", "FileContentsManager"), ("default", "cli", "ServerApp"), ("default", "cli", "FileContentsManager"), ("default", "config", "ServerApp"), ("default", "config", "FileContentsManager"), ("default", "default", "ServerApp"), ("default", "default", "FileContentsManager"), ], ) def test_preferred_dir_validation( root_dir_loc, preferred_dir_loc, config_target, tmp_path, jp_config_dir, jp_configurable_serverapp, ): expected_root_dir = str(tmp_path) os_preferred_dir = str(tmp_path / "subdir") os.makedirs(os_preferred_dir, exist_ok=True) config_preferred_dir = os_preferred_dir if config_target == "ServerApp" else "subdir" config_preferred_dir = config_preferred_dir + "/" # add trailing slash to ensure it is removed expected_preferred_dir = "subdir" argv = [] kwargs = {"root_dir": None} config_lines = [] config_file = None if root_dir_loc == "config" or preferred_dir_loc == "config": config_file = jp_config_dir.joinpath("jupyter_server_config.py") if root_dir_loc == "cli": argv.append(f"--{config_target}.root_dir={expected_root_dir}") if root_dir_loc == "config": config_lines.append(f'c.{config_target}.root_dir = r"{expected_root_dir}"') if root_dir_loc == "default": expected_root_dir = os.getcwd() if preferred_dir_loc == "cli": argv.append(f"--{config_target}.preferred_dir={config_preferred_dir}") if preferred_dir_loc == "config": config_lines.append(f'c.{config_target}.preferred_dir = r"{config_preferred_dir}"') if preferred_dir_loc == "default": expected_preferred_dir = "" if config_file is not None: config_file.write_text("\n".join(config_lines)) if argv: kwargs["argv"] = argv # type:ignore[assignment] if root_dir_loc == "default" and preferred_dir_loc != "default": # error expected with pytest.raises(SystemExit): jp_configurable_serverapp(**kwargs) else: > app = jp_configurable_serverapp(**kwargs) argv = ['--ServerApp.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6'] config_file = None config_lines = [] config_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6/subdir/' config_target = 'ServerApp' expected_preferred_dir = '' expected_root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6' jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2553420> kwargs = {'argv': ['--ServerApp.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6'], 'root_dir': None} os_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6/subdir' preferred_dir_loc = 'default' root_dir_loc = 'cli' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6') tests/test_serverapp.py:468: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'fba18ed7' environ = None http_port = 36249 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2553920> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36249 jp_logging_stream = <_io.StringIO object at 0x7f21b25a0ac0> kwargs = {} root_dir = None tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b252b390> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:55.697 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_6/config/jupyter_server_config.json ________ test_preferred_dir_validation[cli-default-FileContentsManager] ________ root_dir_loc = 'cli', preferred_dir_loc = 'default' config_target = 'FileContentsManager' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7') jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b256d440> @pytest.mark.filterwarnings("ignore::FutureWarning") @pytest.mark.parametrize( "root_dir_loc,preferred_dir_loc,config_target", [ ("cli", "cli", "ServerApp"), ("cli", "cli", "FileContentsManager"), ("cli", "config", "ServerApp"), ("cli", "config", "FileContentsManager"), ("cli", "default", "ServerApp"), ("cli", "default", "FileContentsManager"), ("config", "cli", "ServerApp"), ("config", "cli", "FileContentsManager"), ("config", "config", "ServerApp"), ("config", "config", "FileContentsManager"), ("config", "default", "ServerApp"), ("config", "default", "FileContentsManager"), ("default", "cli", "ServerApp"), ("default", "cli", "FileContentsManager"), ("default", "config", "ServerApp"), ("default", "config", "FileContentsManager"), ("default", "default", "ServerApp"), ("default", "default", "FileContentsManager"), ], ) def test_preferred_dir_validation( root_dir_loc, preferred_dir_loc, config_target, tmp_path, jp_config_dir, jp_configurable_serverapp, ): expected_root_dir = str(tmp_path) os_preferred_dir = str(tmp_path / "subdir") os.makedirs(os_preferred_dir, exist_ok=True) config_preferred_dir = os_preferred_dir if config_target == "ServerApp" else "subdir" config_preferred_dir = config_preferred_dir + "/" # add trailing slash to ensure it is removed expected_preferred_dir = "subdir" argv = [] kwargs = {"root_dir": None} config_lines = [] config_file = None if root_dir_loc == "config" or preferred_dir_loc == "config": config_file = jp_config_dir.joinpath("jupyter_server_config.py") if root_dir_loc == "cli": argv.append(f"--{config_target}.root_dir={expected_root_dir}") if root_dir_loc == "config": config_lines.append(f'c.{config_target}.root_dir = r"{expected_root_dir}"') if root_dir_loc == "default": expected_root_dir = os.getcwd() if preferred_dir_loc == "cli": argv.append(f"--{config_target}.preferred_dir={config_preferred_dir}") if preferred_dir_loc == "config": config_lines.append(f'c.{config_target}.preferred_dir = r"{config_preferred_dir}"') if preferred_dir_loc == "default": expected_preferred_dir = "" if config_file is not None: config_file.write_text("\n".join(config_lines)) if argv: kwargs["argv"] = argv # type:ignore[assignment] if root_dir_loc == "default" and preferred_dir_loc != "default": # error expected with pytest.raises(SystemExit): jp_configurable_serverapp(**kwargs) else: > app = jp_configurable_serverapp(**kwargs) argv = ['--FileContentsManager.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7'] config_file = None config_lines = [] config_preferred_dir = 'subdir/' config_target = 'FileContentsManager' expected_preferred_dir = '' expected_root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7' jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b256d440> kwargs = {'argv': ['--FileContentsManager.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7'], 'root_dir': None} os_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7/subdir' preferred_dir_loc = 'default' root_dir_loc = 'cli' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7') tests/test_serverapp.py:468: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--FileContentsManager.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '92368d22' environ = None http_port = 39219 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b256d6c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39219 jp_logging_stream = <_io.StringIO object at 0x7f21b25a1fc0> kwargs = {} root_dir = None tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--FileContentsManager.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--FileContentsManager.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--FileContentsManager.root_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b25c3de0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:55.789 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'FileContentsManager': {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'FileContentsManager': {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'FileContentsManager': {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_7/config/jupyter_server_config.json _____________ test_preferred_dir_validation[config-cli-ServerApp] ______________ root_dir_loc = 'config', preferred_dir_loc = 'cli', config_target = 'ServerApp' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8') jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b256e0c0> @pytest.mark.filterwarnings("ignore::FutureWarning") @pytest.mark.parametrize( "root_dir_loc,preferred_dir_loc,config_target", [ ("cli", "cli", "ServerApp"), ("cli", "cli", "FileContentsManager"), ("cli", "config", "ServerApp"), ("cli", "config", "FileContentsManager"), ("cli", "default", "ServerApp"), ("cli", "default", "FileContentsManager"), ("config", "cli", "ServerApp"), ("config", "cli", "FileContentsManager"), ("config", "config", "ServerApp"), ("config", "config", "FileContentsManager"), ("config", "default", "ServerApp"), ("config", "default", "FileContentsManager"), ("default", "cli", "ServerApp"), ("default", "cli", "FileContentsManager"), ("default", "config", "ServerApp"), ("default", "config", "FileContentsManager"), ("default", "default", "ServerApp"), ("default", "default", "FileContentsManager"), ], ) def test_preferred_dir_validation( root_dir_loc, preferred_dir_loc, config_target, tmp_path, jp_config_dir, jp_configurable_serverapp, ): expected_root_dir = str(tmp_path) os_preferred_dir = str(tmp_path / "subdir") os.makedirs(os_preferred_dir, exist_ok=True) config_preferred_dir = os_preferred_dir if config_target == "ServerApp" else "subdir" config_preferred_dir = config_preferred_dir + "/" # add trailing slash to ensure it is removed expected_preferred_dir = "subdir" argv = [] kwargs = {"root_dir": None} config_lines = [] config_file = None if root_dir_loc == "config" or preferred_dir_loc == "config": config_file = jp_config_dir.joinpath("jupyter_server_config.py") if root_dir_loc == "cli": argv.append(f"--{config_target}.root_dir={expected_root_dir}") if root_dir_loc == "config": config_lines.append(f'c.{config_target}.root_dir = r"{expected_root_dir}"') if root_dir_loc == "default": expected_root_dir = os.getcwd() if preferred_dir_loc == "cli": argv.append(f"--{config_target}.preferred_dir={config_preferred_dir}") if preferred_dir_loc == "config": config_lines.append(f'c.{config_target}.preferred_dir = r"{config_preferred_dir}"') if preferred_dir_loc == "default": expected_preferred_dir = "" if config_file is not None: config_file.write_text("\n".join(config_lines)) if argv: kwargs["argv"] = argv # type:ignore[assignment] if root_dir_loc == "default" and preferred_dir_loc != "default": # error expected with pytest.raises(SystemExit): jp_configurable_serverapp(**kwargs) else: > app = jp_configurable_serverapp(**kwargs) argv = ['--ServerApp.preferred_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/subdir/'] config_file = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/config/jupyter_server_config.py') config_lines = ['c.ServerApp.root_dir = ' 'r"/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8"'] config_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/subdir/' config_target = 'ServerApp' expected_preferred_dir = 'subdir' expected_root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8' jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b256e0c0> kwargs = {'argv': ['--ServerApp.preferred_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/subdir/'], 'root_dir': None} os_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/subdir' preferred_dir_loc = 'cli' root_dir_loc = 'config' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8') tests/test_serverapp.py:468: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.preferred_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/subdir/'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '4c63a05e' environ = None http_port = 34687 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b256e200> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 34687 jp_logging_stream = <_io.StringIO object at 0x7f21b25a10c0> kwargs = {} root_dir = None tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.preferred_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/subdir/'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.preferred_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/subdir/'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.preferred_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/subdir/'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2529680> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:55.883 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'preferred_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/subdir/'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/config DEBUG ServerApp:application.py:929 Loaded config file: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/config/jupyter_server_config.py DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'preferred_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/subdir/'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'preferred_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/subdir/', 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_8/config/jupyter_server_config.json ________ test_preferred_dir_validation[config-cli-FileContentsManager] _________ root_dir_loc = 'config', preferred_dir_loc = 'cli' config_target = 'FileContentsManager' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9') jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b256ed40> @pytest.mark.filterwarnings("ignore::FutureWarning") @pytest.mark.parametrize( "root_dir_loc,preferred_dir_loc,config_target", [ ("cli", "cli", "ServerApp"), ("cli", "cli", "FileContentsManager"), ("cli", "config", "ServerApp"), ("cli", "config", "FileContentsManager"), ("cli", "default", "ServerApp"), ("cli", "default", "FileContentsManager"), ("config", "cli", "ServerApp"), ("config", "cli", "FileContentsManager"), ("config", "config", "ServerApp"), ("config", "config", "FileContentsManager"), ("config", "default", "ServerApp"), ("config", "default", "FileContentsManager"), ("default", "cli", "ServerApp"), ("default", "cli", "FileContentsManager"), ("default", "config", "ServerApp"), ("default", "config", "FileContentsManager"), ("default", "default", "ServerApp"), ("default", "default", "FileContentsManager"), ], ) def test_preferred_dir_validation( root_dir_loc, preferred_dir_loc, config_target, tmp_path, jp_config_dir, jp_configurable_serverapp, ): expected_root_dir = str(tmp_path) os_preferred_dir = str(tmp_path / "subdir") os.makedirs(os_preferred_dir, exist_ok=True) config_preferred_dir = os_preferred_dir if config_target == "ServerApp" else "subdir" config_preferred_dir = config_preferred_dir + "/" # add trailing slash to ensure it is removed expected_preferred_dir = "subdir" argv = [] kwargs = {"root_dir": None} config_lines = [] config_file = None if root_dir_loc == "config" or preferred_dir_loc == "config": config_file = jp_config_dir.joinpath("jupyter_server_config.py") if root_dir_loc == "cli": argv.append(f"--{config_target}.root_dir={expected_root_dir}") if root_dir_loc == "config": config_lines.append(f'c.{config_target}.root_dir = r"{expected_root_dir}"') if root_dir_loc == "default": expected_root_dir = os.getcwd() if preferred_dir_loc == "cli": argv.append(f"--{config_target}.preferred_dir={config_preferred_dir}") if preferred_dir_loc == "config": config_lines.append(f'c.{config_target}.preferred_dir = r"{config_preferred_dir}"') if preferred_dir_loc == "default": expected_preferred_dir = "" if config_file is not None: config_file.write_text("\n".join(config_lines)) if argv: kwargs["argv"] = argv # type:ignore[assignment] if root_dir_loc == "default" and preferred_dir_loc != "default": # error expected with pytest.raises(SystemExit): jp_configurable_serverapp(**kwargs) else: > app = jp_configurable_serverapp(**kwargs) argv = ['--FileContentsManager.preferred_dir=subdir/'] config_file = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9/config/jupyter_server_config.py') config_lines = ['c.FileContentsManager.root_dir = ' 'r"/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9"'] config_preferred_dir = 'subdir/' config_target = 'FileContentsManager' expected_preferred_dir = 'subdir' expected_root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9' jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b256ed40> kwargs = {'argv': ['--FileContentsManager.preferred_dir=subdir/'], 'root_dir': None} os_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9/subdir' preferred_dir_loc = 'cli' root_dir_loc = 'config' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9') tests/test_serverapp.py:468: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--FileContentsManager.preferred_dir=subdir/'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '577db940' environ = None http_port = 43969 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b256efc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43969 jp_logging_stream = <_io.StringIO object at 0x7f21b25a2c80> kwargs = {} root_dir = None tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--FileContentsManager.preferred_dir=subdir/'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--FileContentsManager.preferred_dir=subdir/'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--FileContentsManager.preferred_dir=subdir/'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b28a5450> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:55.986 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'FileContentsManager': {'preferred_dir': 'subdir/'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9/config DEBUG ServerApp:application.py:929 Loaded config file: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9/config/jupyter_server_config.py DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'FileContentsManager': {'preferred_dir': 'subdir/'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'FileContentsManager': {'preferred_dir': 'subdir/', 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_9/config/jupyter_server_config.json ____________ test_preferred_dir_validation[config-config-ServerApp] ____________ root_dir_loc = 'config', preferred_dir_loc = 'config' config_target = 'ServerApp' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10') jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b256f880> @pytest.mark.filterwarnings("ignore::FutureWarning") @pytest.mark.parametrize( "root_dir_loc,preferred_dir_loc,config_target", [ ("cli", "cli", "ServerApp"), ("cli", "cli", "FileContentsManager"), ("cli", "config", "ServerApp"), ("cli", "config", "FileContentsManager"), ("cli", "default", "ServerApp"), ("cli", "default", "FileContentsManager"), ("config", "cli", "ServerApp"), ("config", "cli", "FileContentsManager"), ("config", "config", "ServerApp"), ("config", "config", "FileContentsManager"), ("config", "default", "ServerApp"), ("config", "default", "FileContentsManager"), ("default", "cli", "ServerApp"), ("default", "cli", "FileContentsManager"), ("default", "config", "ServerApp"), ("default", "config", "FileContentsManager"), ("default", "default", "ServerApp"), ("default", "default", "FileContentsManager"), ], ) def test_preferred_dir_validation( root_dir_loc, preferred_dir_loc, config_target, tmp_path, jp_config_dir, jp_configurable_serverapp, ): expected_root_dir = str(tmp_path) os_preferred_dir = str(tmp_path / "subdir") os.makedirs(os_preferred_dir, exist_ok=True) config_preferred_dir = os_preferred_dir if config_target == "ServerApp" else "subdir" config_preferred_dir = config_preferred_dir + "/" # add trailing slash to ensure it is removed expected_preferred_dir = "subdir" argv = [] kwargs = {"root_dir": None} config_lines = [] config_file = None if root_dir_loc == "config" or preferred_dir_loc == "config": config_file = jp_config_dir.joinpath("jupyter_server_config.py") if root_dir_loc == "cli": argv.append(f"--{config_target}.root_dir={expected_root_dir}") if root_dir_loc == "config": config_lines.append(f'c.{config_target}.root_dir = r"{expected_root_dir}"') if root_dir_loc == "default": expected_root_dir = os.getcwd() if preferred_dir_loc == "cli": argv.append(f"--{config_target}.preferred_dir={config_preferred_dir}") if preferred_dir_loc == "config": config_lines.append(f'c.{config_target}.preferred_dir = r"{config_preferred_dir}"') if preferred_dir_loc == "default": expected_preferred_dir = "" if config_file is not None: config_file.write_text("\n".join(config_lines)) if argv: kwargs["argv"] = argv # type:ignore[assignment] if root_dir_loc == "default" and preferred_dir_loc != "default": # error expected with pytest.raises(SystemExit): jp_configurable_serverapp(**kwargs) else: > app = jp_configurable_serverapp(**kwargs) argv = [] config_file = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10/config/jupyter_server_config.py') config_lines = ['c.ServerApp.root_dir = ' 'r"/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10"', 'c.ServerApp.preferred_dir = ' 'r"/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10/subdir/"'] config_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10/subdir/' config_target = 'ServerApp' expected_preferred_dir = 'subdir' expected_root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10' jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b256f880> kwargs = {'root_dir': None} os_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10/subdir' preferred_dir_loc = 'config' root_dir_loc = 'config' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10') tests/test_serverapp.py:468: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '2e1e78fe' environ = None http_port = 40229 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b256e520> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 40229 jp_logging_stream = <_io.StringIO object at 0x7f21b25a31c0> kwargs = {} root_dir = None tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b28a5720> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:56.073 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10/config DEBUG ServerApp:application.py:929 Loaded config file: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10/config/jupyter_server_config.py DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10', 'preferred_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10/subdir/'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_10/config/jupyter_server_config.json _______ test_preferred_dir_validation[config-config-FileContentsManager] _______ root_dir_loc = 'config', preferred_dir_loc = 'config' config_target = 'FileContentsManager' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11') jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b256d9e0> @pytest.mark.filterwarnings("ignore::FutureWarning") @pytest.mark.parametrize( "root_dir_loc,preferred_dir_loc,config_target", [ ("cli", "cli", "ServerApp"), ("cli", "cli", "FileContentsManager"), ("cli", "config", "ServerApp"), ("cli", "config", "FileContentsManager"), ("cli", "default", "ServerApp"), ("cli", "default", "FileContentsManager"), ("config", "cli", "ServerApp"), ("config", "cli", "FileContentsManager"), ("config", "config", "ServerApp"), ("config", "config", "FileContentsManager"), ("config", "default", "ServerApp"), ("config", "default", "FileContentsManager"), ("default", "cli", "ServerApp"), ("default", "cli", "FileContentsManager"), ("default", "config", "ServerApp"), ("default", "config", "FileContentsManager"), ("default", "default", "ServerApp"), ("default", "default", "FileContentsManager"), ], ) def test_preferred_dir_validation( root_dir_loc, preferred_dir_loc, config_target, tmp_path, jp_config_dir, jp_configurable_serverapp, ): expected_root_dir = str(tmp_path) os_preferred_dir = str(tmp_path / "subdir") os.makedirs(os_preferred_dir, exist_ok=True) config_preferred_dir = os_preferred_dir if config_target == "ServerApp" else "subdir" config_preferred_dir = config_preferred_dir + "/" # add trailing slash to ensure it is removed expected_preferred_dir = "subdir" argv = [] kwargs = {"root_dir": None} config_lines = [] config_file = None if root_dir_loc == "config" or preferred_dir_loc == "config": config_file = jp_config_dir.joinpath("jupyter_server_config.py") if root_dir_loc == "cli": argv.append(f"--{config_target}.root_dir={expected_root_dir}") if root_dir_loc == "config": config_lines.append(f'c.{config_target}.root_dir = r"{expected_root_dir}"') if root_dir_loc == "default": expected_root_dir = os.getcwd() if preferred_dir_loc == "cli": argv.append(f"--{config_target}.preferred_dir={config_preferred_dir}") if preferred_dir_loc == "config": config_lines.append(f'c.{config_target}.preferred_dir = r"{config_preferred_dir}"') if preferred_dir_loc == "default": expected_preferred_dir = "" if config_file is not None: config_file.write_text("\n".join(config_lines)) if argv: kwargs["argv"] = argv # type:ignore[assignment] if root_dir_loc == "default" and preferred_dir_loc != "default": # error expected with pytest.raises(SystemExit): jp_configurable_serverapp(**kwargs) else: > app = jp_configurable_serverapp(**kwargs) argv = [] config_file = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11/config/jupyter_server_config.py') config_lines = ['c.FileContentsManager.root_dir = ' 'r"/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11"', 'c.FileContentsManager.preferred_dir = r"subdir/"'] config_preferred_dir = 'subdir/' config_target = 'FileContentsManager' expected_preferred_dir = 'subdir' expected_root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11' jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b256d9e0> kwargs = {'root_dir': None} os_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11/subdir' preferred_dir_loc = 'config' root_dir_loc = 'config' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11') tests/test_serverapp.py:468: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '0543cc71' environ = None http_port = 44861 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b256e8e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44861 jp_logging_stream = <_io.StringIO object at 0x7f21b25a3640> kwargs = {} root_dir = None tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b28a5ef0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:56.172 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11/config DEBUG ServerApp:application.py:929 Loaded config file: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11/config/jupyter_server_config.py DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'FileContentsManager': {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11', 'preferred_dir': 'subdir/'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_11/config/jupyter_server_config.json ___________ test_preferred_dir_validation[config-default-ServerApp] ____________ root_dir_loc = 'config', preferred_dir_loc = 'default' config_target = 'ServerApp' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12') jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b256fce0> @pytest.mark.filterwarnings("ignore::FutureWarning") @pytest.mark.parametrize( "root_dir_loc,preferred_dir_loc,config_target", [ ("cli", "cli", "ServerApp"), ("cli", "cli", "FileContentsManager"), ("cli", "config", "ServerApp"), ("cli", "config", "FileContentsManager"), ("cli", "default", "ServerApp"), ("cli", "default", "FileContentsManager"), ("config", "cli", "ServerApp"), ("config", "cli", "FileContentsManager"), ("config", "config", "ServerApp"), ("config", "config", "FileContentsManager"), ("config", "default", "ServerApp"), ("config", "default", "FileContentsManager"), ("default", "cli", "ServerApp"), ("default", "cli", "FileContentsManager"), ("default", "config", "ServerApp"), ("default", "config", "FileContentsManager"), ("default", "default", "ServerApp"), ("default", "default", "FileContentsManager"), ], ) def test_preferred_dir_validation( root_dir_loc, preferred_dir_loc, config_target, tmp_path, jp_config_dir, jp_configurable_serverapp, ): expected_root_dir = str(tmp_path) os_preferred_dir = str(tmp_path / "subdir") os.makedirs(os_preferred_dir, exist_ok=True) config_preferred_dir = os_preferred_dir if config_target == "ServerApp" else "subdir" config_preferred_dir = config_preferred_dir + "/" # add trailing slash to ensure it is removed expected_preferred_dir = "subdir" argv = [] kwargs = {"root_dir": None} config_lines = [] config_file = None if root_dir_loc == "config" or preferred_dir_loc == "config": config_file = jp_config_dir.joinpath("jupyter_server_config.py") if root_dir_loc == "cli": argv.append(f"--{config_target}.root_dir={expected_root_dir}") if root_dir_loc == "config": config_lines.append(f'c.{config_target}.root_dir = r"{expected_root_dir}"') if root_dir_loc == "default": expected_root_dir = os.getcwd() if preferred_dir_loc == "cli": argv.append(f"--{config_target}.preferred_dir={config_preferred_dir}") if preferred_dir_loc == "config": config_lines.append(f'c.{config_target}.preferred_dir = r"{config_preferred_dir}"') if preferred_dir_loc == "default": expected_preferred_dir = "" if config_file is not None: config_file.write_text("\n".join(config_lines)) if argv: kwargs["argv"] = argv # type:ignore[assignment] if root_dir_loc == "default" and preferred_dir_loc != "default": # error expected with pytest.raises(SystemExit): jp_configurable_serverapp(**kwargs) else: > app = jp_configurable_serverapp(**kwargs) argv = [] config_file = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12/config/jupyter_server_config.py') config_lines = ['c.ServerApp.root_dir = ' 'r"/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12"'] config_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12/subdir/' config_target = 'ServerApp' expected_preferred_dir = '' expected_root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12' jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b256fce0> kwargs = {'root_dir': None} os_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12/subdir' preferred_dir_loc = 'default' root_dir_loc = 'config' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12') tests/test_serverapp.py:468: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'f3d4caa9' environ = None http_port = 38103 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b28d0180> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 38103 jp_logging_stream = <_io.StringIO object at 0x7f21b25a3ac0> kwargs = {} root_dir = None tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b254ba20> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:56.260 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12/config DEBUG ServerApp:application.py:929 Loaded config file: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12/config/jupyter_server_config.py DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_12/config/jupyter_server_config.json ______ test_preferred_dir_validation[config-default-FileContentsManager] _______ root_dir_loc = 'config', preferred_dir_loc = 'default' config_target = 'FileContentsManager' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13') jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b28d1580> @pytest.mark.filterwarnings("ignore::FutureWarning") @pytest.mark.parametrize( "root_dir_loc,preferred_dir_loc,config_target", [ ("cli", "cli", "ServerApp"), ("cli", "cli", "FileContentsManager"), ("cli", "config", "ServerApp"), ("cli", "config", "FileContentsManager"), ("cli", "default", "ServerApp"), ("cli", "default", "FileContentsManager"), ("config", "cli", "ServerApp"), ("config", "cli", "FileContentsManager"), ("config", "config", "ServerApp"), ("config", "config", "FileContentsManager"), ("config", "default", "ServerApp"), ("config", "default", "FileContentsManager"), ("default", "cli", "ServerApp"), ("default", "cli", "FileContentsManager"), ("default", "config", "ServerApp"), ("default", "config", "FileContentsManager"), ("default", "default", "ServerApp"), ("default", "default", "FileContentsManager"), ], ) def test_preferred_dir_validation( root_dir_loc, preferred_dir_loc, config_target, tmp_path, jp_config_dir, jp_configurable_serverapp, ): expected_root_dir = str(tmp_path) os_preferred_dir = str(tmp_path / "subdir") os.makedirs(os_preferred_dir, exist_ok=True) config_preferred_dir = os_preferred_dir if config_target == "ServerApp" else "subdir" config_preferred_dir = config_preferred_dir + "/" # add trailing slash to ensure it is removed expected_preferred_dir = "subdir" argv = [] kwargs = {"root_dir": None} config_lines = [] config_file = None if root_dir_loc == "config" or preferred_dir_loc == "config": config_file = jp_config_dir.joinpath("jupyter_server_config.py") if root_dir_loc == "cli": argv.append(f"--{config_target}.root_dir={expected_root_dir}") if root_dir_loc == "config": config_lines.append(f'c.{config_target}.root_dir = r"{expected_root_dir}"') if root_dir_loc == "default": expected_root_dir = os.getcwd() if preferred_dir_loc == "cli": argv.append(f"--{config_target}.preferred_dir={config_preferred_dir}") if preferred_dir_loc == "config": config_lines.append(f'c.{config_target}.preferred_dir = r"{config_preferred_dir}"') if preferred_dir_loc == "default": expected_preferred_dir = "" if config_file is not None: config_file.write_text("\n".join(config_lines)) if argv: kwargs["argv"] = argv # type:ignore[assignment] if root_dir_loc == "default" and preferred_dir_loc != "default": # error expected with pytest.raises(SystemExit): jp_configurable_serverapp(**kwargs) else: > app = jp_configurable_serverapp(**kwargs) argv = [] config_file = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13/config/jupyter_server_config.py') config_lines = ['c.FileContentsManager.root_dir = ' 'r"/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13"'] config_preferred_dir = 'subdir/' config_target = 'FileContentsManager' expected_preferred_dir = '' expected_root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13' jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b28d1580> kwargs = {'root_dir': None} os_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13/subdir' preferred_dir_loc = 'default' root_dir_loc = 'config' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13') tests/test_serverapp.py:468: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '173dd1c5' environ = None http_port = 41839 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b28d0ae0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 41839 jp_logging_stream = <_io.StringIO object at 0x7f21b25a3f40> kwargs = {} root_dir = None tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b25494a0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:56.353 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13/config DEBUG ServerApp:application.py:929 Loaded config file: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13/config/jupyter_server_config.py DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'FileContentsManager': {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_13/config/jupyter_server_config.json _____________ test_preferred_dir_validation[default-cli-ServerApp] _____________ root_dir_loc = 'default', preferred_dir_loc = 'cli', config_target = 'ServerApp' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14') jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b28d22a0> @pytest.mark.filterwarnings("ignore::FutureWarning") @pytest.mark.parametrize( "root_dir_loc,preferred_dir_loc,config_target", [ ("cli", "cli", "ServerApp"), ("cli", "cli", "FileContentsManager"), ("cli", "config", "ServerApp"), ("cli", "config", "FileContentsManager"), ("cli", "default", "ServerApp"), ("cli", "default", "FileContentsManager"), ("config", "cli", "ServerApp"), ("config", "cli", "FileContentsManager"), ("config", "config", "ServerApp"), ("config", "config", "FileContentsManager"), ("config", "default", "ServerApp"), ("config", "default", "FileContentsManager"), ("default", "cli", "ServerApp"), ("default", "cli", "FileContentsManager"), ("default", "config", "ServerApp"), ("default", "config", "FileContentsManager"), ("default", "default", "ServerApp"), ("default", "default", "FileContentsManager"), ], ) def test_preferred_dir_validation( root_dir_loc, preferred_dir_loc, config_target, tmp_path, jp_config_dir, jp_configurable_serverapp, ): expected_root_dir = str(tmp_path) os_preferred_dir = str(tmp_path / "subdir") os.makedirs(os_preferred_dir, exist_ok=True) config_preferred_dir = os_preferred_dir if config_target == "ServerApp" else "subdir" config_preferred_dir = config_preferred_dir + "/" # add trailing slash to ensure it is removed expected_preferred_dir = "subdir" argv = [] kwargs = {"root_dir": None} config_lines = [] config_file = None if root_dir_loc == "config" or preferred_dir_loc == "config": config_file = jp_config_dir.joinpath("jupyter_server_config.py") if root_dir_loc == "cli": argv.append(f"--{config_target}.root_dir={expected_root_dir}") if root_dir_loc == "config": config_lines.append(f'c.{config_target}.root_dir = r"{expected_root_dir}"') if root_dir_loc == "default": expected_root_dir = os.getcwd() if preferred_dir_loc == "cli": argv.append(f"--{config_target}.preferred_dir={config_preferred_dir}") if preferred_dir_loc == "config": config_lines.append(f'c.{config_target}.preferred_dir = r"{config_preferred_dir}"') if preferred_dir_loc == "default": expected_preferred_dir = "" if config_file is not None: config_file.write_text("\n".join(config_lines)) if argv: kwargs["argv"] = argv # type:ignore[assignment] if root_dir_loc == "default" and preferred_dir_loc != "default": # error expected with pytest.raises(SystemExit): > jp_configurable_serverapp(**kwargs) argv = ['--ServerApp.preferred_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/subdir/'] config_file = None config_lines = [] config_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/subdir/' config_target = 'ServerApp' expected_preferred_dir = 'subdir' expected_root_dir = '/builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2' jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b28d22a0> kwargs = {'argv': ['--ServerApp.preferred_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/subdir/'], 'root_dir': None} os_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/subdir' preferred_dir_loc = 'cli' root_dir_loc = 'default' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14') tests/test_serverapp.py:466: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.preferred_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/subdir/'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '2abcbbab' environ = None http_port = 43829 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b28d2520> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43829 jp_logging_stream = <_io.StringIO object at 0x7f21b25a3dc0> kwargs = {} root_dir = None tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.preferred_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/subdir/'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.preferred_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/subdir/'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.preferred_dir=/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/subdir/'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b254b660> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:56.443 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'preferred_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/subdir/'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'preferred_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/subdir/'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'preferred_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/subdir/'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_14/config/jupyter_server_config.json ________ test_preferred_dir_validation[default-cli-FileContentsManager] ________ root_dir_loc = 'default', preferred_dir_loc = 'cli' config_target = 'FileContentsManager' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_15') jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_15/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b28d2f20> @pytest.mark.filterwarnings("ignore::FutureWarning") @pytest.mark.parametrize( "root_dir_loc,preferred_dir_loc,config_target", [ ("cli", "cli", "ServerApp"), ("cli", "cli", "FileContentsManager"), ("cli", "config", "ServerApp"), ("cli", "config", "FileContentsManager"), ("cli", "default", "ServerApp"), ("cli", "default", "FileContentsManager"), ("config", "cli", "ServerApp"), ("config", "cli", "FileContentsManager"), ("config", "config", "ServerApp"), ("config", "config", "FileContentsManager"), ("config", "default", "ServerApp"), ("config", "default", "FileContentsManager"), ("default", "cli", "ServerApp"), ("default", "cli", "FileContentsManager"), ("default", "config", "ServerApp"), ("default", "config", "FileContentsManager"), ("default", "default", "ServerApp"), ("default", "default", "FileContentsManager"), ], ) def test_preferred_dir_validation( root_dir_loc, preferred_dir_loc, config_target, tmp_path, jp_config_dir, jp_configurable_serverapp, ): expected_root_dir = str(tmp_path) os_preferred_dir = str(tmp_path / "subdir") os.makedirs(os_preferred_dir, exist_ok=True) config_preferred_dir = os_preferred_dir if config_target == "ServerApp" else "subdir" config_preferred_dir = config_preferred_dir + "/" # add trailing slash to ensure it is removed expected_preferred_dir = "subdir" argv = [] kwargs = {"root_dir": None} config_lines = [] config_file = None if root_dir_loc == "config" or preferred_dir_loc == "config": config_file = jp_config_dir.joinpath("jupyter_server_config.py") if root_dir_loc == "cli": argv.append(f"--{config_target}.root_dir={expected_root_dir}") if root_dir_loc == "config": config_lines.append(f'c.{config_target}.root_dir = r"{expected_root_dir}"') if root_dir_loc == "default": expected_root_dir = os.getcwd() if preferred_dir_loc == "cli": argv.append(f"--{config_target}.preferred_dir={config_preferred_dir}") if preferred_dir_loc == "config": config_lines.append(f'c.{config_target}.preferred_dir = r"{config_preferred_dir}"') if preferred_dir_loc == "default": expected_preferred_dir = "" if config_file is not None: config_file.write_text("\n".join(config_lines)) if argv: kwargs["argv"] = argv # type:ignore[assignment] if root_dir_loc == "default" and preferred_dir_loc != "default": # error expected with pytest.raises(SystemExit): > jp_configurable_serverapp(**kwargs) argv = ['--FileContentsManager.preferred_dir=subdir/'] config_file = None config_lines = [] config_preferred_dir = 'subdir/' config_target = 'FileContentsManager' expected_preferred_dir = 'subdir' expected_root_dir = '/builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2' jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_15/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b28d2f20> kwargs = {'argv': ['--FileContentsManager.preferred_dir=subdir/'], 'root_dir': None} os_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_15/subdir' preferred_dir_loc = 'cli' root_dir_loc = 'default' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_15') tests/test_serverapp.py:466: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--FileContentsManager.preferred_dir=subdir/'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '6f5a119a' environ = None http_port = 36577 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b28d3060> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36577 jp_logging_stream = <_io.StringIO object at 0x7f21b25a1e40> kwargs = {} root_dir = None tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_15') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--FileContentsManager.preferred_dir=subdir/'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--FileContentsManager.preferred_dir=subdir/'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--FileContentsManager.preferred_dir=subdir/'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b296a2b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:56.532 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_15/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_15/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_15/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_15/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_15/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_15/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'FileContentsManager': {'preferred_dir': 'subdir/'}} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_15/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_15/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_15/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'FileContentsManager': {'preferred_dir': 'subdir/'}} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'FileContentsManager': {'preferred_dir': 'subdir/'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_15/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_15/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_15/config/jupyter_server_config.json ___________ test_preferred_dir_validation[default-config-ServerApp] ____________ root_dir_loc = 'default', preferred_dir_loc = 'config' config_target = 'ServerApp' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16') jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b28d39c0> @pytest.mark.filterwarnings("ignore::FutureWarning") @pytest.mark.parametrize( "root_dir_loc,preferred_dir_loc,config_target", [ ("cli", "cli", "ServerApp"), ("cli", "cli", "FileContentsManager"), ("cli", "config", "ServerApp"), ("cli", "config", "FileContentsManager"), ("cli", "default", "ServerApp"), ("cli", "default", "FileContentsManager"), ("config", "cli", "ServerApp"), ("config", "cli", "FileContentsManager"), ("config", "config", "ServerApp"), ("config", "config", "FileContentsManager"), ("config", "default", "ServerApp"), ("config", "default", "FileContentsManager"), ("default", "cli", "ServerApp"), ("default", "cli", "FileContentsManager"), ("default", "config", "ServerApp"), ("default", "config", "FileContentsManager"), ("default", "default", "ServerApp"), ("default", "default", "FileContentsManager"), ], ) def test_preferred_dir_validation( root_dir_loc, preferred_dir_loc, config_target, tmp_path, jp_config_dir, jp_configurable_serverapp, ): expected_root_dir = str(tmp_path) os_preferred_dir = str(tmp_path / "subdir") os.makedirs(os_preferred_dir, exist_ok=True) config_preferred_dir = os_preferred_dir if config_target == "ServerApp" else "subdir" config_preferred_dir = config_preferred_dir + "/" # add trailing slash to ensure it is removed expected_preferred_dir = "subdir" argv = [] kwargs = {"root_dir": None} config_lines = [] config_file = None if root_dir_loc == "config" or preferred_dir_loc == "config": config_file = jp_config_dir.joinpath("jupyter_server_config.py") if root_dir_loc == "cli": argv.append(f"--{config_target}.root_dir={expected_root_dir}") if root_dir_loc == "config": config_lines.append(f'c.{config_target}.root_dir = r"{expected_root_dir}"') if root_dir_loc == "default": expected_root_dir = os.getcwd() if preferred_dir_loc == "cli": argv.append(f"--{config_target}.preferred_dir={config_preferred_dir}") if preferred_dir_loc == "config": config_lines.append(f'c.{config_target}.preferred_dir = r"{config_preferred_dir}"') if preferred_dir_loc == "default": expected_preferred_dir = "" if config_file is not None: config_file.write_text("\n".join(config_lines)) if argv: kwargs["argv"] = argv # type:ignore[assignment] if root_dir_loc == "default" and preferred_dir_loc != "default": # error expected with pytest.raises(SystemExit): > jp_configurable_serverapp(**kwargs) argv = [] config_file = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16/config/jupyter_server_config.py') config_lines = ['c.ServerApp.preferred_dir = ' 'r"/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16/subdir/"'] config_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16/subdir/' config_target = 'ServerApp' expected_preferred_dir = 'subdir' expected_root_dir = '/builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2' jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b28d39c0> kwargs = {'root_dir': None} os_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16/subdir' preferred_dir_loc = 'config' root_dir_loc = 'default' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16') tests/test_serverapp.py:466: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'e6c50a75' environ = None http_port = 33657 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b28d2660> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33657 jp_logging_stream = <_io.StringIO object at 0x7f21b25a3940> kwargs = {} root_dir = None tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b28ea170> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:56.631 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16/config DEBUG ServerApp:application.py:929 Loaded config file: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16/config/jupyter_server_config.py DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'preferred_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16/subdir/'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_16/config/jupyter_server_config.json ______ test_preferred_dir_validation[default-config-FileContentsManager] _______ root_dir_loc = 'default', preferred_dir_loc = 'config' config_target = 'FileContentsManager' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_17') jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_17/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b28d1e40> @pytest.mark.filterwarnings("ignore::FutureWarning") @pytest.mark.parametrize( "root_dir_loc,preferred_dir_loc,config_target", [ ("cli", "cli", "ServerApp"), ("cli", "cli", "FileContentsManager"), ("cli", "config", "ServerApp"), ("cli", "config", "FileContentsManager"), ("cli", "default", "ServerApp"), ("cli", "default", "FileContentsManager"), ("config", "cli", "ServerApp"), ("config", "cli", "FileContentsManager"), ("config", "config", "ServerApp"), ("config", "config", "FileContentsManager"), ("config", "default", "ServerApp"), ("config", "default", "FileContentsManager"), ("default", "cli", "ServerApp"), ("default", "cli", "FileContentsManager"), ("default", "config", "ServerApp"), ("default", "config", "FileContentsManager"), ("default", "default", "ServerApp"), ("default", "default", "FileContentsManager"), ], ) def test_preferred_dir_validation( root_dir_loc, preferred_dir_loc, config_target, tmp_path, jp_config_dir, jp_configurable_serverapp, ): expected_root_dir = str(tmp_path) os_preferred_dir = str(tmp_path / "subdir") os.makedirs(os_preferred_dir, exist_ok=True) config_preferred_dir = os_preferred_dir if config_target == "ServerApp" else "subdir" config_preferred_dir = config_preferred_dir + "/" # add trailing slash to ensure it is removed expected_preferred_dir = "subdir" argv = [] kwargs = {"root_dir": None} config_lines = [] config_file = None if root_dir_loc == "config" or preferred_dir_loc == "config": config_file = jp_config_dir.joinpath("jupyter_server_config.py") if root_dir_loc == "cli": argv.append(f"--{config_target}.root_dir={expected_root_dir}") if root_dir_loc == "config": config_lines.append(f'c.{config_target}.root_dir = r"{expected_root_dir}"') if root_dir_loc == "default": expected_root_dir = os.getcwd() if preferred_dir_loc == "cli": argv.append(f"--{config_target}.preferred_dir={config_preferred_dir}") if preferred_dir_loc == "config": config_lines.append(f'c.{config_target}.preferred_dir = r"{config_preferred_dir}"') if preferred_dir_loc == "default": expected_preferred_dir = "" if config_file is not None: config_file.write_text("\n".join(config_lines)) if argv: kwargs["argv"] = argv # type:ignore[assignment] if root_dir_loc == "default" and preferred_dir_loc != "default": # error expected with pytest.raises(SystemExit): > jp_configurable_serverapp(**kwargs) argv = [] config_file = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_17/config/jupyter_server_config.py') config_lines = ['c.FileContentsManager.preferred_dir = r"subdir/"'] config_preferred_dir = 'subdir/' config_target = 'FileContentsManager' expected_preferred_dir = 'subdir' expected_root_dir = '/builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2' jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_17/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b28d1e40> kwargs = {'root_dir': None} os_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_17/subdir' preferred_dir_loc = 'config' root_dir_loc = 'default' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_17') tests/test_serverapp.py:466: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'ad648834' environ = None http_port = 44883 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b28d32e0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 44883 jp_logging_stream = <_io.StringIO object at 0x7f21b28207c0> kwargs = {} root_dir = None tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_17') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2816a80> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:56.721 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_17/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_17/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_17/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_17/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_17/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_17/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_17/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_17/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_17/config DEBUG ServerApp:application.py:929 Loaded config file: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_17/config/jupyter_server_config.py DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }, 'FileContentsManager': {'preferred_dir': 'subdir/'}} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_17/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_17/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_17/config/jupyter_server_config.json ___________ test_preferred_dir_validation[default-default-ServerApp] ___________ root_dir_loc = 'default', preferred_dir_loc = 'default' config_target = 'ServerApp' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_18') jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_18/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b28400e0> @pytest.mark.filterwarnings("ignore::FutureWarning") @pytest.mark.parametrize( "root_dir_loc,preferred_dir_loc,config_target", [ ("cli", "cli", "ServerApp"), ("cli", "cli", "FileContentsManager"), ("cli", "config", "ServerApp"), ("cli", "config", "FileContentsManager"), ("cli", "default", "ServerApp"), ("cli", "default", "FileContentsManager"), ("config", "cli", "ServerApp"), ("config", "cli", "FileContentsManager"), ("config", "config", "ServerApp"), ("config", "config", "FileContentsManager"), ("config", "default", "ServerApp"), ("config", "default", "FileContentsManager"), ("default", "cli", "ServerApp"), ("default", "cli", "FileContentsManager"), ("default", "config", "ServerApp"), ("default", "config", "FileContentsManager"), ("default", "default", "ServerApp"), ("default", "default", "FileContentsManager"), ], ) def test_preferred_dir_validation( root_dir_loc, preferred_dir_loc, config_target, tmp_path, jp_config_dir, jp_configurable_serverapp, ): expected_root_dir = str(tmp_path) os_preferred_dir = str(tmp_path / "subdir") os.makedirs(os_preferred_dir, exist_ok=True) config_preferred_dir = os_preferred_dir if config_target == "ServerApp" else "subdir" config_preferred_dir = config_preferred_dir + "/" # add trailing slash to ensure it is removed expected_preferred_dir = "subdir" argv = [] kwargs = {"root_dir": None} config_lines = [] config_file = None if root_dir_loc == "config" or preferred_dir_loc == "config": config_file = jp_config_dir.joinpath("jupyter_server_config.py") if root_dir_loc == "cli": argv.append(f"--{config_target}.root_dir={expected_root_dir}") if root_dir_loc == "config": config_lines.append(f'c.{config_target}.root_dir = r"{expected_root_dir}"') if root_dir_loc == "default": expected_root_dir = os.getcwd() if preferred_dir_loc == "cli": argv.append(f"--{config_target}.preferred_dir={config_preferred_dir}") if preferred_dir_loc == "config": config_lines.append(f'c.{config_target}.preferred_dir = r"{config_preferred_dir}"') if preferred_dir_loc == "default": expected_preferred_dir = "" if config_file is not None: config_file.write_text("\n".join(config_lines)) if argv: kwargs["argv"] = argv # type:ignore[assignment] if root_dir_loc == "default" and preferred_dir_loc != "default": # error expected with pytest.raises(SystemExit): jp_configurable_serverapp(**kwargs) else: > app = jp_configurable_serverapp(**kwargs) argv = [] config_file = None config_lines = [] config_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_18/subdir/' config_target = 'ServerApp' expected_preferred_dir = '' expected_root_dir = '/builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2' jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_18/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b28400e0> kwargs = {'root_dir': None} os_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_18/subdir' preferred_dir_loc = 'default' root_dir_loc = 'default' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_18') tests/test_serverapp.py:468: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '3f1ac96d' environ = None http_port = 35321 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b28402c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35321 jp_logging_stream = <_io.StringIO object at 0x7f21b2820b80> kwargs = {} root_dir = None tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_18') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b28e98b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:56.815 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_18/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_18/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_18/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_18/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_18/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_18/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_18/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_18/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_18/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_18/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_18/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_18/config/jupyter_server_config.json ______ test_preferred_dir_validation[default-default-FileContentsManager] ______ root_dir_loc = 'default', preferred_dir_loc = 'default' config_target = 'FileContentsManager' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_19') jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_19/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2841940> @pytest.mark.filterwarnings("ignore::FutureWarning") @pytest.mark.parametrize( "root_dir_loc,preferred_dir_loc,config_target", [ ("cli", "cli", "ServerApp"), ("cli", "cli", "FileContentsManager"), ("cli", "config", "ServerApp"), ("cli", "config", "FileContentsManager"), ("cli", "default", "ServerApp"), ("cli", "default", "FileContentsManager"), ("config", "cli", "ServerApp"), ("config", "cli", "FileContentsManager"), ("config", "config", "ServerApp"), ("config", "config", "FileContentsManager"), ("config", "default", "ServerApp"), ("config", "default", "FileContentsManager"), ("default", "cli", "ServerApp"), ("default", "cli", "FileContentsManager"), ("default", "config", "ServerApp"), ("default", "config", "FileContentsManager"), ("default", "default", "ServerApp"), ("default", "default", "FileContentsManager"), ], ) def test_preferred_dir_validation( root_dir_loc, preferred_dir_loc, config_target, tmp_path, jp_config_dir, jp_configurable_serverapp, ): expected_root_dir = str(tmp_path) os_preferred_dir = str(tmp_path / "subdir") os.makedirs(os_preferred_dir, exist_ok=True) config_preferred_dir = os_preferred_dir if config_target == "ServerApp" else "subdir" config_preferred_dir = config_preferred_dir + "/" # add trailing slash to ensure it is removed expected_preferred_dir = "subdir" argv = [] kwargs = {"root_dir": None} config_lines = [] config_file = None if root_dir_loc == "config" or preferred_dir_loc == "config": config_file = jp_config_dir.joinpath("jupyter_server_config.py") if root_dir_loc == "cli": argv.append(f"--{config_target}.root_dir={expected_root_dir}") if root_dir_loc == "config": config_lines.append(f'c.{config_target}.root_dir = r"{expected_root_dir}"') if root_dir_loc == "default": expected_root_dir = os.getcwd() if preferred_dir_loc == "cli": argv.append(f"--{config_target}.preferred_dir={config_preferred_dir}") if preferred_dir_loc == "config": config_lines.append(f'c.{config_target}.preferred_dir = r"{config_preferred_dir}"') if preferred_dir_loc == "default": expected_preferred_dir = "" if config_file is not None: config_file.write_text("\n".join(config_lines)) if argv: kwargs["argv"] = argv # type:ignore[assignment] if root_dir_loc == "default" and preferred_dir_loc != "default": # error expected with pytest.raises(SystemExit): jp_configurable_serverapp(**kwargs) else: > app = jp_configurable_serverapp(**kwargs) argv = [] config_file = None config_lines = [] config_preferred_dir = 'subdir/' config_target = 'FileContentsManager' expected_preferred_dir = '' expected_root_dir = '/builddir/build/BUILD/python-jupyter-server-2.14.2-build/jupyter_server-2.14.2' jp_config_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_19/config') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2841940> kwargs = {'root_dir': None} os_preferred_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_19/subdir' preferred_dir_loc = 'default' root_dir_loc = 'default' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_19') tests/test_serverapp.py:468: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'aa2fc7b7' environ = None http_port = 39313 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2841a80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 39313 jp_logging_stream = <_io.StringIO object at 0x7f21b28219c0> kwargs = {} root_dir = None tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_19') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2814410> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:56.903 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_19/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_19/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_19/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_19/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_19/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_19/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_19/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_19/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_19/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_19/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_19/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_preferred_dir_validation_19/config/jupyter_server_config.json ________________ test_invalid_preferred_dir_does_not_exist_set _________________ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_doe1') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b28409a0> def test_invalid_preferred_dir_does_not_exist_set(tmp_path, jp_configurable_serverapp): path = str(tmp_path) path_subdir = str(tmp_path / "subdir") > app = jp_configurable_serverapp(root_dir=path) jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b28409a0> path = '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_doe1' path_subdir = '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_doe1/subdir' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_doe1') tests/test_serverapp.py:487: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'ca8502fc' environ = None http_port = 42711 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2841260> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 42711 jp_logging_stream = <_io.StringIO object at 0x7f21b2820700> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_doe1'} root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_doe1' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_doe1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2875f40> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:57.002 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_doe1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_doe1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_doe1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_doe1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_doe1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_doe1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_doe1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_doe1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_doe1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_doe1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_doe1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_doe1/config/jupyter_server_config.json __________________ test_invalid_preferred_dir_not_root_subdir __________________ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not0') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2842ca0> @pytest.mark.filterwarnings("ignore::FutureWarning") def test_invalid_preferred_dir_not_root_subdir(tmp_path, jp_configurable_serverapp): path = str(tmp_path / "subdir") os.makedirs(path, exist_ok=True) not_subdir_path = str(tmp_path) with pytest.raises(SystemExit): > jp_configurable_serverapp(root_dir=path, preferred_dir=not_subdir_path) jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2842ca0> not_subdir_path = '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not0' path = '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not0/subdir' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not0') tests/test_serverapp.py:501: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '05764658' environ = None http_port = 46343 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b2843060> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46343 jp_logging_stream = <_io.StringIO object at 0x7f21b2820c40> kwargs = {'preferred_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not0', 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not0/subdir'} root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not0/subdir' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2876850> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:57.107 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not0/config/jupyter_server_config.json ________________ test_invalid_preferred_dir_not_root_subdir_set ________________ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not1') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2843880> async def test_invalid_preferred_dir_not_root_subdir_set(tmp_path, jp_configurable_serverapp): path = str(tmp_path / "subdir") os.makedirs(path, exist_ok=True) not_subdir_path = os.path.relpath(tmp_path, path) > app = jp_configurable_serverapp(root_dir=path) jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b2843880> not_subdir_path = '..' path = '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not1/subdir' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not1') tests/test_serverapp.py:509: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:213: in _configurable_serverapp app.initialize(argv=argv, new_httpserver=False) app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '41c42010' environ = None http_port = 35657 jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 35657 jp_logging_stream = <_io.StringIO object at 0x7f21b2821e40> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not1/subdir'} root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not1/subdir' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not1') /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2877c50> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:57.200 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_invalid_preferred_dir_not1/config/jupyter_server_config.json _______________ test_absolute_preferred_dir_not_root_subdir_set ________________ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_absolute_preferred_dir_no0') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b28427a0> async def test_absolute_preferred_dir_not_root_subdir_set(tmp_path, jp_configurable_serverapp): path = str(tmp_path / "subdir") os.makedirs(path, exist_ok=True) not_subdir_path = str(tmp_path) > app = jp_configurable_serverapp(root_dir=path) jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b28427a0> not_subdir_path = '/tmp/pytest-of-mockbuild/pytest-0/test_absolute_preferred_dir_no0' path = '/tmp/pytest-of-mockbuild/pytest-0/test_absolute_preferred_dir_no0/subdir' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_absolute_preferred_dir_no0') tests/test_serverapp.py:521: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:213: in _configurable_serverapp app.initialize(argv=argv, new_httpserver=False) app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '7a87db00' environ = None http_port = 36727 jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36727 jp_logging_stream = <_io.StringIO object at 0x7f21b28225c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_absolute_preferred_dir_no0/subdir'} root_dir = '/tmp/pytest-of-mockbuild/pytest-0/test_absolute_preferred_dir_no0/subdir' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_absolute_preferred_dir_no0') /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2877890> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:57.281 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_absolute_preferred_dir_no0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_absolute_preferred_dir_no0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_absolute_preferred_dir_no0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_absolute_preferred_dir_no0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_absolute_preferred_dir_no0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_absolute_preferred_dir_no0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_absolute_preferred_dir_no0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_absolute_preferred_dir_no0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_absolute_preferred_dir_no0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_absolute_preferred_dir_no0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_absolute_preferred_dir_no0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_absolute_preferred_dir_no0/config/jupyter_server_config.json ________________________ test_browser_open_files[True] _________________________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b26f0fe0> should_exist = True caplog = <_pytest.logging.LogCaptureFixture object at 0x7f21b2618140> @pytest.mark.parametrize("should_exist", [True, False]) def test_browser_open_files(jp_configurable_serverapp, should_exist, caplog): > app = jp_configurable_serverapp(no_browser_open_file=not should_exist) caplog = <_pytest.logging.LogCaptureFixture object at 0x7f21b2618140> jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b26f0fe0> should_exist = True tests/test_serverapp.py:610: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '0a0f1b8e' environ = None http_port = 33621 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b26f20c0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 33621 jp_logging_stream = <_io.StringIO object at 0x7f21b264da80> kwargs = {'no_browser_open_file': False, 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_True_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_True_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_True_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2684870> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:58.261 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_True_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_True_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_True_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_True_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_True_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_True_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_True_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_True_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_True_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_True_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_True_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_True_0/config/jupyter_server_config.json ________________________ test_browser_open_files[False] ________________________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b26f2a20> should_exist = False caplog = <_pytest.logging.LogCaptureFixture object at 0x7f21b2618d70> @pytest.mark.parametrize("should_exist", [True, False]) def test_browser_open_files(jp_configurable_serverapp, should_exist, caplog): > app = jp_configurable_serverapp(no_browser_open_file=not should_exist) caplog = <_pytest.logging.LogCaptureFixture object at 0x7f21b2618d70> jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b26f2a20> should_exist = False tests/test_serverapp.py:610: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = [] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '534d6dee' environ = None http_port = 32915 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b26f3b00> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 32915 jp_logging_stream = <_io.StringIO object at 0x7f21b264c040> kwargs = {'no_browser_open_file': True, 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_False_0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_False_0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_False_0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = [] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': [], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = [] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b26849b0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:58.352 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_False_0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_False_0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_False_0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_False_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_False_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_False_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_False_0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_False_0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_False_0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_False_0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_False_0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_browser_open_files_False_0/config/jupyter_server_config.json ____________________ test_deprecated_notebook_dir_priority _____________________ jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b26dd3a0> tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0') def test_deprecated_notebook_dir_priority(jp_configurable_serverapp, tmp_path): notebook_dir = tmp_path / "notebook" notebook_dir.mkdir() cli_dir = tmp_path / "cli" cli_dir.mkdir() > app = jp_configurable_serverapp(argv=[str(cli_dir)], root_dir=None) cli_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0/cli') jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b26dd3a0> notebook_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0/notebook') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0') tests/test_serverapp.py:623: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0/cli'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '5755295a' environ = None http_port = 45599 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b26dd620> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 45599 jp_logging_stream = <_io.StringIO object at 0x7f21b264d000> kwargs = {} root_dir = None tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0/cli'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0/cli'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0/cli'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b2686f30> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:58.448 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0/cli'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0/cli'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'jpserver_extensions': {'jupyter_server_terminals': True}, 'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0/cli'}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_deprecated_notebook_dir_p0/config/jupyter_server_config.json _____________________________ test_culling_config ______________________________ jp_server_config = {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b24a2160> @flaky def test_culling_config(jp_server_config, jp_configurable_serverapp): > app = jp_configurable_serverapp() jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b24a2160> jp_server_config = {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} tests/test_terminal.py:235: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'd5a8ce84' environ = None http_port = 46859 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b24a2340> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 46859 jp_logging_stream = <_io.StringIO object at 0x7f21b2430d00> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_culling_config1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_culling_config1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_culling_config1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.jpserver_extensions', 'jupyter_server_terminals=True'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b243eee0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:58.938 ServerApp] Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_culling_config0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_culling_config0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_culling_config0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling_config0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling_config0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling_config0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling_config0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling_config0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling_config0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_culling_config0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_culling_config0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_culling_config0/config/jupyter_server_config.json ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:59.026 ServerApp] Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_culling_config1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_culling_config1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_culling_config1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling_config1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling_config1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling_config1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling_config1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling_config1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_culling_config1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_culling_config1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_culling_config1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_culling_config1/config/jupyter_server_config.json _ test_shell_command_override[shell_command="['/path/to/shell', '-l']"-expected_shell0-5.4] _ terminado_settings = 'shell_command="[\'/path/to/shell\', \'-l\']"' expected_shell = ['/path/to/shell', '-l'], min_traitlets = '5.4' jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b24a18a0> @pytest.mark.parametrize( "terminado_settings,expected_shell,min_traitlets", [ ("shell_command=\"['/path/to/shell', '-l']\"", ["/path/to/shell", "-l"], "5.4"), ('shell_command="/string/path/to/shell -l"', ["/string/path/to/shell", "-l"], "5.1"), ], ) def test_shell_command_override( terminado_settings, expected_shell, min_traitlets, jp_configurable_serverapp ): pytest.importorskip("traitlets", minversion=min_traitlets) argv = shlex.split(f"--ServerApp.terminado_settings={terminado_settings}") > app = jp_configurable_serverapp(argv=argv) argv = ["--ServerApp.terminado_settings=shell_command=['/path/to/shell', '-l']"] expected_shell = ['/path/to/shell', '-l'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b24a18a0> min_traitlets = '5.4' terminado_settings = 'shell_command="[\'/path/to/shell\', \'-l\']"' tests/test_terminal.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ["--ServerApp.terminado_settings=shell_command=['/path/to/shell', '-l']"] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = 'b4d4ebe0' environ = None http_port = 36341 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b24a0b80> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 36341 jp_logging_stream = <_io.StringIO object at 0x7f21b2431000> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh0/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh0/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh0') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ["--ServerApp.terminado_settings=shell_command=['/path/to/shell', '-l']"] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ["--ServerApp.terminado_settings=shell_command=['/path/to/shell', " "'-l']"], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ["--ServerApp.terminado_settings=shell_command=['/path/to/shell', '-l']"] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b24ab160> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:59.301 ServerApp] Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh0/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh0/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh0/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'terminado_settings': {'shell_command': ['/path/to/shell', '-l']}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh0/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh0/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh0/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'terminado_settings': {'shell_command': ['/path/to/shell', '-l']}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'terminado_settings': {'shell_command': ['/path/to/shell', '-l']}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh0/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh0/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh0/config/jupyter_server_config.json _ test_shell_command_override[shell_command="/string/path/to/shell -l"-expected_shell1-5.1] _ terminado_settings = 'shell_command="/string/path/to/shell -l"' expected_shell = ['/string/path/to/shell', '-l'], min_traitlets = '5.1' jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b24a2660> @pytest.mark.parametrize( "terminado_settings,expected_shell,min_traitlets", [ ("shell_command=\"['/path/to/shell', '-l']\"", ["/path/to/shell", "-l"], "5.4"), ('shell_command="/string/path/to/shell -l"', ["/string/path/to/shell", "-l"], "5.1"), ], ) def test_shell_command_override( terminado_settings, expected_shell, min_traitlets, jp_configurable_serverapp ): pytest.importorskip("traitlets", minversion=min_traitlets) argv = shlex.split(f"--ServerApp.terminado_settings={terminado_settings}") > app = jp_configurable_serverapp(argv=argv) argv = ['--ServerApp.terminado_settings=shell_command=/string/path/to/shell -l'] expected_shell = ['/string/path/to/shell', '-l'] jp_configurable_serverapp = ._configurable_serverapp at 0x7f21b24a2660> min_traitlets = '5.1' terminado_settings = 'shell_command="/string/path/to/shell -l"' tests/test_terminal.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:219: in _configurable_serverapp jp_asyncio_loop.run_until_complete(initialize_app()) # type:ignore[no-untyped-call] app = argv = ['--ServerApp.terminado_settings=shell_command=/string/path/to/shell -l'] base_url = '/a%40b/' c = {'IdentityProvider': {'token': }, 'NotebookNotary': {'db_file': ':memory:'}, 'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} config = {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}} default_token = '7a1a501b' environ = None http_port = 43915 initialize_app = ._configurable_serverapp..initialize_app at 0x7f21b24a2fc0> jp_asyncio_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> jp_http_port = 43915 jp_logging_stream = <_io.StringIO object at 0x7f21b24316c0> kwargs = {'root_dir': '/tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh1/root_dir'} root_dir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh1/root_dir') tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh1') /usr/lib64/python3.13/asyncio/base_events.py:720: in run_until_complete return future.result() future = ._configurable_serverapp..initialize_app() done, defined at /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:216> exception=JupyterEventsVersionWarning('The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib/python3.13/site-packages/pytest_jupyter/jupyter_server.py:217: in initialize_app app.initialize(argv=argv, new_httpserver=False) app = argv = ['--ServerApp.terminado_settings=shell_command=/string/path/to/shell -l'] /usr/lib/python3.13/site-packages/traitlets/config/application.py:118: in inner return method(app, *args, **kwargs) app = args = () kwargs = {'argv': ['--ServerApp.terminado_settings=shell_command=/string/path/to/shell ' '-l'], 'new_httpserver': False} method = ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2739: in initialize self.init_event_logger() __class__ = argv = ['--ServerApp.terminado_settings=shell_command=/string/path/to/shell -l'] find_extensions = True new_httpserver = False self = starter_extension = None ../BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/serverapp.py:2180: in init_event_logger self.event_logger.register_event_schema(schema_path) rel_schema_path = 'contents_service/v1.yaml' schema_id = 'https://events.jupyter.org/jupyter_server/contents_service/v1' schema_ids = ['https://events.jupyter.org/jupyter_server/contents_service/v1', 'https://events.jupyter.org/jupyter_server/gateway_client/v1', 'https://events.jupyter.org/jupyter_server/kernel_actions/v1'] schema_path = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/logger.py:153: in register_event_schema event_schema = self.schemas.register(schema) # type:ignore[arg-type] schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema_registry.py:48: in register schema = EventSchema(schema) schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = /usr/lib/python3.13/site-packages/jupyter_events/schema.py:68: in __init__ validate_schema(_schema) _schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} format_checker = registry = None schema = PosixPath('/builddir/build/BUILD/python-jupyter-server-2.14.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupyter_server/event_schemas/contents_service/v1.yaml') self = <[AttributeError("'EventSchema' object has no attribute '_schema'") raised in repr()] EventSchema object at 0x7f21b243e4e0> validator_class = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via t...urce_path': {'description': "Source path of an operation when action is 'copy' or 'rename'\n", 'type': 'string'}}, ...} def validate_schema(schema: dict[str, Any]) -> None: """Validate a schema dict.""" try: # If the `version` attribute is an integer, coerce to string. # TODO: remove this in a future version. if "version" in schema and isinstance(schema["version"], int): schema["version"] = str(schema["version"]) msg = ( "The `version` property of an event schema must be a string. " "It has been type coerced, but in a future version of this " "library, it will fail to validate. Please update schema: " f"{schema['$id']}" ) > warnings.warn(JupyterEventsVersionWarning(msg), stacklevel=2) E jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 msg = ('The `version` property of an event schema must be a string. It has been type ' 'coerced, but in a future version of this library, it will fail to validate. ' 'Please update schema: ' 'https://events.jupyter.org/jupyter_server/contents_service/v1') schema = {'$id': 'https://events.jupyter.org/jupyter_server/contents_service/v1', 'description': 'Record actions on files via the ContentsManager.\n' '\n' 'The notebook ContentsManager REST API is used by all ' 'frontends to retrieve,\n' 'save, list, delete and perform other actions on notebooks, ' 'directories,\n' 'and other files through the UI. This is pluggable - the ' 'default acts on\n' 'the file system, but can be replaced with a different ' 'ContentsManager\n' 'implementation - to work on S3, Postgres, other object ' 'stores, etc.\n' 'The events get recorded regardless of the ContentsManager ' 'implementation\n' 'being used.\n' '\n' 'Limitations:\n' '\n' '1. This does not record all filesystem access, just the ones ' 'that happen\n' " explicitly via the notebook server's REST API. Users can " '(and often do)\n' ' trivially access the filesystem in many other ways (such ' 'as `open()` calls\n' ' in their code), so this is usually never a complete ' 'record.\n' '2. As with all events recorded by the notebook server, users ' 'most likely\n' ' have the ability to modify the code of the notebook ' 'server. Unless other\n' ' security measures are in place, these events should be ' 'treated as user\n' ' controlled and not used in high security areas.\n' '3. Events are only recorded when an action succeeds.\n', 'personal-data': True, 'properties': {'action': {'description': 'Action performed by the ' 'ContentsManager API.\n' '\n' 'This is a required field.\n' '\n' 'Possible values:\n' '\n' '1. get\n' ' Get contents of a particular ' 'file, or list contents of a ' 'directory.\n' '\n' '2. save\n' ' Save a file at path with ' 'contents from the client\n' '\n' '3. rename\n' ' Rename a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '4. copy\n' ' Copy a file or directory from ' 'value in source_path to\n' ' value in path.\n' '\n' '5. delete\n' ' Delete a file or empty directory ' 'at given path\n', 'enum': ['get', 'create', 'save', 'upload', 'rename', 'copy', 'delete']}, 'path': {'description': 'Logical path on which the operation ' 'was performed.\n' '\n' 'This is a required field.\n', 'type': 'string'}, 'source_path': {'description': 'Source path of an operation ' "when action is 'copy' or " "'rename'\n", 'type': 'string'}}, 'required': ['action', 'path'], 'title': 'Contents Manager activities', 'type': 'object', 'version': '1'} /usr/lib/python3.13/site-packages/jupyter_events/validators.py:72: JupyterEventsVersionWarning ----------------------------- Captured stderr call ----------------------------- [D 2024-12-18 10:42:59.401 ServerApp] Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} ------------------------------ Captured log call ------------------------------- DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:194 Searching ['/tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh1/config', '/builddir/.local/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh1/env/etc/jupyter', '/tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh1/etc/jupyter'] for config files DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_config in /tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'terminado_settings': {'shell_command': '/string/path/to/shell -l'}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh1/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh1/env/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /builddir/.local/etc/jupyter DEBUG ServerApp:application.py:908 Looking for jupyter_server_config in /tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh1/config DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'terminado_settings': {'shell_command': '/string/path/to/shell -l'}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:application.py:457 Config changed: {'ServerApp': {'TerminalManager': {'cull_inactive_timeout': 10, 'cull_interval': 3}, 'jpserver_extensions': {'jupyter_server_terminals': True}, 'terminado_settings': {'shell_command': '/string/path/to/shell -l'}}, 'NotebookNotary': {'db_file': ':memory:'}, 'IdentityProvider': {'token': }} DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh1/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh1/env/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /builddir/.local/etc/jupyter/jupyter_server_config.json DEBUG ServerApp:config_manager.py:98 Paths used for configuration of jupyter_server_config: /tmp/pytest-of-mockbuild/pytest-0/test_shell_command_override_sh1/config/jupyter_server_config.json =============================== warnings summary =============================== tests/test_files.py::test_file_types[jupyter_server.files.handlers.FilesHandler] /usr/lib/python3.13/site-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored in: Traceback (most recent call last): File "", line 713, in __getitem__ KeyError: b'COLUMNS' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 716, in __getitem__ ResourceWarning: unclosed database in warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) tests/unix_sockets/test_api.py::test_list_running_servers /usr/lib/python3.13/site-packages/_pytest/fixtures.py:1029: ResourceWarning: unclosed self.cached_result = None Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ===Flaky Test Report=== test_connection[jp_server_config0] failed (1 runs remaining out of 2). The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] test_connection[jp_server_config0] failed; it passed 0 out of the required 1 times. The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] test_connection[jp_server_config1] failed (1 runs remaining out of 2). The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] test_connection[jp_server_config1] failed; it passed 0 out of the required 1 times. The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] test_connection[jp_server_config2] failed (1 runs remaining out of 2). The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] test_connection[jp_server_config2] failed; it passed 0 out of the required 1 times. The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] test_restart_kernel[jp_server_config0] failed (1 runs remaining out of 2). The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] test_restart_kernel[jp_server_config0] failed; it passed 0 out of the required 1 times. The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] test_restart_kernel[jp_server_config1] failed (1 runs remaining out of 2). The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] test_restart_kernel[jp_server_config1] failed; it passed 0 out of the required 1 times. The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] test_restart_kernel[jp_server_config2] failed (1 runs remaining out of 2). The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] test_restart_kernel[jp_server_config2] failed; it passed 0 out of the required 1 times. The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] test_restart_kernel[jp_server_config3] failed (1 runs remaining out of 2). The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] test_restart_kernel[jp_server_config3] failed; it passed 0 out of the required 1 times. The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] test_culling_config failed (1 runs remaining out of 2). The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] test_culling_config failed; it passed 0 out of the required 1 times. The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] test_culling failed (1 runs remaining out of 2). The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] test_culling failed; it passed 0 out of the required 1 times. The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] ===End Flaky Test Report=== ============================= slowest 10 durations ============================= 3.11s call tests/services/sessions/test_manager.py::test_pending_kernel 1.00s call tests/base/test_call_context.py::test_multi_context_operations 1.00s call tests/test_gateway.py::test_channel_queue_get_msg_without_timeout 0.57s call tests/extension/test_serverextension.py::test_help_output 0.50s call tests/extension/test_entrypoint.py::test_server_extension_list[subprocess] 0.44s call tests/test_serverapp.py::test_help_output 0.43s call tests/test_utils.py::test_help_output 0.42s call tests/extension/test_launch.py::test_base_url 0.42s call tests/extension/test_launch.py::test_launch_instance 0.42s call tests/extension/test_launch.py::test_token_file =========================== short test summary info ============================ SKIPPED [1] tests/nbconvert/test_handlers.py:48: Command 'pandoc' is not available SKIPPED [1] tests/nbconvert/test_handlers.py:77: Command 'pandoc' is not available SKIPPED [1] tests/nbconvert/test_handlers.py:90: Command 'pandoc' is not available SKIPPED [1] tests/nbconvert/test_handlers.py:104: Command 'pandoc' is not available SKIPPED [1] tests/nbconvert/test_handlers.py:117: Command 'pandoc' is not available SKIPPED [1] tests/nbconvert/test_handlers.py:136: Command 'pandoc' is not available SKIPPED [1] tests/test_terminal.py:161: Not yet working SKIPPED [1] tests/test_terminal.py:198: Not yet working SKIPPED [7] tests/conftest.py:42: Skipping this test because it's marked 'integration_test'. Run integration tests using the `--integration_tests` flag. ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-GET-/view/{nbpath}-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-GET-/api/contents-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-POST-/api/contents-{"type": "directory"}] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-PUT-/api/contents/foo-{"type": "directory"}] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-PATCH-/api/contents/{nbpath}-{"path": "/newpath"}] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-DELETE-/api/contents/{nbpath}-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-GET-/api/kernels-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-GET-/api/kernels/{kernel_id}-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-GET-/api/kernels/{kernel_id}/channels-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-POST-/api/kernels/{kernel_id}/interrupt-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-POST-/api/kernels/{kernel_id}/restart-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-DELETE-/api/kernels/{kernel_id}-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-POST-/api/kernels-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-GET-/api/kernelspecs-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-GET-/api/kernelspecs/{kernelspec}-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-GET-/api/nbconvert-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-GET-/api/spec.yaml-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-GET-/api/status-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-GET-/api/config/foo-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-PUT-/api/config/foo-{}] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-PATCH-/api/config/foo-{}] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-POST-api/security/csp-report-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-GET-/api/sessions-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-GET-/api/sessions/{session_id}-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-PATCH-/api/sessions/{session_id}-{}] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-DELETE-/api/sessions/{session_id}-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-POST-/api/sessions-{"path": "foo", "type": "bar"}] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-POST-/api/terminals-] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-GET-/api/terminals-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-GET-/terminals/websocket/{term_name}-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[True-DELETE-/api/terminals/{term_name}-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-GET-/view/{nbpath}-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-GET-/api/contents-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-POST-/api/contents-{"type": "directory"}] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-PUT-/api/contents/foo-{"type": "directory"}] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-PATCH-/api/contents/{nbpath}-{"path": "/newpath"}] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-DELETE-/api/contents/{nbpath}-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-GET-/api/kernels-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-GET-/api/kernels/{kernel_id}-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-GET-/api/kernels/{kernel_id}/channels-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-POST-/api/kernels/{kernel_id}/interrupt-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-POST-/api/kernels/{kernel_id}/restart-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-DELETE-/api/kernels/{kernel_id}-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-POST-/api/kernels-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-GET-/api/kernelspecs-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-GET-/api/kernelspecs/{kernelspec}-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-GET-/api/nbconvert-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-GET-/api/spec.yaml-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-GET-/api/status-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-GET-/api/config/foo-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-PUT-/api/config/foo-{}] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-PATCH-/api/config/foo-{}] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-POST-api/security/csp-report-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-GET-/api/sessions-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-GET-/api/sessions/{session_id}-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-PATCH-/api/sessions/{session_id}-{}] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-DELETE-/api/sessions/{session_id}-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-POST-/api/sessions-{"path": "foo", "type": "bar"}] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-POST-/api/terminals-] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-GET-/api/terminals-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-GET-/terminals/websocket/{term_name}-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_authorized_requests[False-DELETE-/api/terminals/{term_name}-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_authorizer.py::test_async_authorizer[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_identity.py::test_auth_disabled - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_legacy_login.py::test_change_password[True] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_legacy_login.py::test_change_password[False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_legacy_login.py::test_login_cookie - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_legacy_login.py::test_logout - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_legacy_login.py::test_legacy_identity_config - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_legacy_login.py::test_legacy_identity_api - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_legacy_login.py::test_legacy_base_class - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_login.py::test_next_bad[\\\\tree] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_login.py::test_next_bad[//some-host] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_login.py::test_next_bad[//host{base_url}tree] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_login.py::test_next_bad[https://google.com] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_login.py::test_next_bad[/absolute/not/base_url] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_login.py::test_next_bad[https:///a%40b/extra/slash] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_login.py::test_next_ok[tree/] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_login.py::test_next_ok[//{base_url}tree] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_login.py::test_next_ok[notebooks/notebook.ipynb] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_login.py::test_next_ok[tree//something] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_login.py::test_login_cookie - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_login.py::test_change_password[True] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_login.py::test_change_password[False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_login.py::test_logout - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/auth/test_login.py::test_token_cookie_user_id - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/base/test_call_context.py::test_jupyter_handler_contextvar - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/base/test_handlers.py::test_authenticated_handler - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/base/test_handlers.py::test_jupyter_handler - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/base/test_handlers.py::test_jupyter_handler_auth_permissive[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/base/test_handlers.py::test_jupyter_handler_auth_required[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/base/test_handlers.py::test_jupyter_handler_auth_calls_prepare[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/base/test_handlers.py::test_jupyter_handler_auth_respsects_identity_provider[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/base/test_handlers.py::test_api_handler - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/base/test_handlers.py::test_authenticated_file_handler - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/base/test_handlers.py::test_api_version_handler - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/base/test_handlers.py::test_files_redirect_handler - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/base/test_handlers.py::test_redirect_with_params - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/base/test_handlers.py::test_static_handler - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/base/test_websocket.py::test_web_socket_mixin - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/base/test_websocket.py::test_web_socket_mixin_ping - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/base/test_websocket.py::test_ping_client_terminated - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/base/test_websocket.py::test_ping_client_timeout - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/base/test_websocket.py::test_websocket_auth_permissive[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/base/test_websocket.py::test_websocket_auth_required[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/base/test_websocket.py::test_websocket_auth_respsects_identity_provider[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/base/test_websocket.py::test_websocket_auth_warns_mixin_lacks_jupyter_handler[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/extension/test_app.py::test_initialize - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/extension/test_app.py::test_instance_creation_with_argv[mock_trait-test mock trait-jp_argv0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/extension/test_app.py::test_extensionapp_load_config_file - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/extension/test_app.py::test_stop_extension - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/extension/test_app.py::test_events - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/extension/test_handler.py::test_handler - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/extension/test_handler.py::test_handler_template - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/extension/test_handler.py::test_handler_gets_blocked[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/extension/test_handler.py::test_handler_setting[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/extension/test_handler.py::test_handler_argv[jp_argv0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/extension/test_handler.py::test_base_url[jp_server_config0-/test_prefix/] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/extension/test_manager.py::test_extension_manager_api - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/extension/test_manager.py::test_extension_manager_linked_extensions - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/extension/test_manager.py::test_extension_manager_fail_add[True] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/extension/test_manager.py::test_extension_manager_fail_add[False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/extension/test_manager.py::test_extension_manager_fail_link[True] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/extension/test_manager.py::test_extension_manager_fail_link[False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/extension/test_manager.py::test_extension_manager_fail_load[True] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/extension/test_manager.py::test_extension_manager_fail_load[False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/extension/test_manager.py::test_disable_no_import[True] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/extension/test_manager.py::test_disable_no_import[False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/extension/test_serverextension.py::test_load_ordered[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/api/test_api.py::test_get_spec - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/api/test_api.py::test_get_status - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/api/test_api.py::test_identity[identity0-expected0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/api/test_api.py::test_identity[identity1-expected1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/api/test_api.py::test_identity[None-403] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/api/test_api.py::test_identity_permissions[*-None-expected0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/api/test_api.py::test_identity_permissions[have_permissions1-check_permissions1-expected1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/api/test_api.py::test_identity_permissions[*-check_permissions2-expected2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/api/test_api.py::test_identity_bad_permissions[] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/api/test_api.py::test_identity_bad_permissions[[]] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/api/test_api.py::test_identity_bad_permissions["abc"] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/api/test_api.py::test_identity_bad_permissions[{"resource": "action"}] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/api/test_api.py::test_identity_bad_permissions[{"resource": [5]}] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/api/test_api.py::test_identity_bad_permissions[{"resource": {}}] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/config/test_api.py::test_create_retrieve_config - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/config/test_api.py::test_modify - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/config/test_api.py::test_get_unknown - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[FileContentsManager--inroot] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[FileContentsManager-Directory with spaces in-inspace] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[FileContentsManager-unicod\xe9-innonascii] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[FileContentsManager-foo-a] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[FileContentsManager-foo-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[FileContentsManager-foo-name with spaces] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[FileContentsManager-foo-unicod\xe9] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[FileContentsManager-foo/bar-baz] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[FileContentsManager-ordering-A] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[FileContentsManager-ordering-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[FileContentsManager-ordering-C] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[FileContentsManager-\xe5 b-\xe7 d] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[AsyncFileContentsManager--inroot] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[AsyncFileContentsManager-Directory with spaces in-inspace] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[AsyncFileContentsManager-unicod\xe9-innonascii] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[AsyncFileContentsManager-foo-a] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[AsyncFileContentsManager-foo-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[AsyncFileContentsManager-foo-name with spaces] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[AsyncFileContentsManager-foo-unicod\xe9] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[AsyncFileContentsManager-foo/bar-baz] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[AsyncFileContentsManager-ordering-A] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[AsyncFileContentsManager-ordering-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[AsyncFileContentsManager-ordering-C] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_notebooks[AsyncFileContentsManager-\xe5 b-\xe7 d] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[FileContentsManager--inroot] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[FileContentsManager-Directory with spaces in-inspace] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[FileContentsManager-unicod\xe9-innonascii] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[FileContentsManager-foo-a] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[FileContentsManager-foo-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[FileContentsManager-foo-name with spaces] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[FileContentsManager-foo-unicod\xe9] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[FileContentsManager-foo/bar-baz] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[FileContentsManager-ordering-A] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[FileContentsManager-ordering-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[FileContentsManager-ordering-C] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[FileContentsManager-\xe5 b-\xe7 d] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[AsyncFileContentsManager--inroot] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[AsyncFileContentsManager-Directory with spaces in-inspace] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[AsyncFileContentsManager-unicod\xe9-innonascii] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[AsyncFileContentsManager-foo-a] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[AsyncFileContentsManager-foo-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[AsyncFileContentsManager-foo-name with spaces] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[AsyncFileContentsManager-foo-unicod\xe9] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[AsyncFileContentsManager-foo/bar-baz] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[AsyncFileContentsManager-ordering-A] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[AsyncFileContentsManager-ordering-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[AsyncFileContentsManager-ordering-C] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_dir_no_contents[AsyncFileContentsManager-\xe5 b-\xe7 d] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_nonexistant_dir[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_list_nonexistant_dir[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[FileContentsManager--inroot] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[FileContentsManager-Directory with spaces in-inspace] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[FileContentsManager-unicod\xe9-innonascii] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[FileContentsManager-foo-a] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[FileContentsManager-foo-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[FileContentsManager-foo-name with spaces] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[FileContentsManager-foo-unicod\xe9] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[FileContentsManager-foo/bar-baz] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[FileContentsManager-ordering-A] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[FileContentsManager-ordering-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[FileContentsManager-ordering-C] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[FileContentsManager-\xe5 b-\xe7 d] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[AsyncFileContentsManager--inroot] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[AsyncFileContentsManager-Directory with spaces in-inspace] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[AsyncFileContentsManager-unicod\xe9-innonascii] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[AsyncFileContentsManager-foo-a] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[AsyncFileContentsManager-foo-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[AsyncFileContentsManager-foo-name with spaces] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[AsyncFileContentsManager-foo-unicod\xe9] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[AsyncFileContentsManager-foo/bar-baz] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[AsyncFileContentsManager-ordering-A] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[AsyncFileContentsManager-ordering-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[AsyncFileContentsManager-ordering-C] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_contents[AsyncFileContentsManager-\xe5 b-\xe7 d] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[FileContentsManager--inroot] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[FileContentsManager-Directory with spaces in-inspace] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[FileContentsManager-unicod\xe9-innonascii] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[FileContentsManager-foo-a] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[FileContentsManager-foo-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[FileContentsManager-foo-name with spaces] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[FileContentsManager-foo-unicod\xe9] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[FileContentsManager-foo/bar-baz] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[FileContentsManager-ordering-A] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[FileContentsManager-ordering-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[FileContentsManager-ordering-C] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[FileContentsManager-\xe5 b-\xe7 d] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[AsyncFileContentsManager--inroot] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[AsyncFileContentsManager-Directory with spaces in-inspace] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[AsyncFileContentsManager-unicod\xe9-innonascii] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[AsyncFileContentsManager-foo-a] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[AsyncFileContentsManager-foo-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[AsyncFileContentsManager-foo-name with spaces] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[AsyncFileContentsManager-foo-unicod\xe9] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[AsyncFileContentsManager-foo/bar-baz] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[AsyncFileContentsManager-ordering-A] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[AsyncFileContentsManager-ordering-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[AsyncFileContentsManager-ordering-C] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_hash[AsyncFileContentsManager-\xe5 b-\xe7 d] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[FileContentsManager--inroot] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[FileContentsManager-Directory with spaces in-inspace] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[FileContentsManager-unicod\xe9-innonascii] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[FileContentsManager-foo-a] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[FileContentsManager-foo-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[FileContentsManager-foo-name with spaces] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[FileContentsManager-foo-unicod\xe9] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[FileContentsManager-foo/bar-baz] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[FileContentsManager-ordering-A] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[FileContentsManager-ordering-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[FileContentsManager-ordering-C] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[FileContentsManager-\xe5 b-\xe7 d] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[AsyncFileContentsManager--inroot] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[AsyncFileContentsManager-Directory with spaces in-inspace] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[AsyncFileContentsManager-unicod\xe9-innonascii] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[AsyncFileContentsManager-foo-a] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[AsyncFileContentsManager-foo-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[AsyncFileContentsManager-foo-name with spaces] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[AsyncFileContentsManager-foo-unicod\xe9] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[AsyncFileContentsManager-foo/bar-baz] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[AsyncFileContentsManager-ordering-A] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[AsyncFileContentsManager-ordering-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[AsyncFileContentsManager-ordering-C] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_no_contents[AsyncFileContentsManager-\xe5 b-\xe7 d] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_invalid[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_nb_invalid[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_contents_no_such_file[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_contents_no_such_file[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[FileContentsManager--inroot] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[FileContentsManager-Directory with spaces in-inspace] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[FileContentsManager-unicod\xe9-innonascii] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[FileContentsManager-foo-a] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[FileContentsManager-foo-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[FileContentsManager-foo-name with spaces] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[FileContentsManager-foo-unicod\xe9] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[FileContentsManager-foo/bar-baz] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[FileContentsManager-ordering-A] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[FileContentsManager-ordering-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[FileContentsManager-ordering-C] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[FileContentsManager-\xe5 b-\xe7 d] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[AsyncFileContentsManager--inroot] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[AsyncFileContentsManager-Directory with spaces in-inspace] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[AsyncFileContentsManager-unicod\xe9-innonascii] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[AsyncFileContentsManager-foo-a] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[AsyncFileContentsManager-foo-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[AsyncFileContentsManager-foo-name with spaces] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[AsyncFileContentsManager-foo-unicod\xe9] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[AsyncFileContentsManager-foo/bar-baz] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[AsyncFileContentsManager-ordering-A] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[AsyncFileContentsManager-ordering-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[AsyncFileContentsManager-ordering-C] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_contents[AsyncFileContentsManager-\xe5 b-\xe7 d] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[FileContentsManager--inroot] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[FileContentsManager-Directory with spaces in-inspace] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[FileContentsManager-unicod\xe9-innonascii] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[FileContentsManager-foo-a] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[FileContentsManager-foo-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[FileContentsManager-foo-name with spaces] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[FileContentsManager-foo-unicod\xe9] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[FileContentsManager-foo/bar-baz] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[FileContentsManager-ordering-A] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[FileContentsManager-ordering-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[FileContentsManager-ordering-C] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[FileContentsManager-\xe5 b-\xe7 d] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[AsyncFileContentsManager--inroot] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[AsyncFileContentsManager-Directory with spaces in-inspace] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[AsyncFileContentsManager-unicod\xe9-innonascii] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[AsyncFileContentsManager-foo-a] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[AsyncFileContentsManager-foo-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[AsyncFileContentsManager-foo-name with spaces] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[AsyncFileContentsManager-foo-unicod\xe9] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[AsyncFileContentsManager-foo/bar-baz] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[AsyncFileContentsManager-ordering-A] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[AsyncFileContentsManager-ordering-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[AsyncFileContentsManager-ordering-C] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_text_file_hash[AsyncFileContentsManager-\xe5 b-\xe7 d] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_404_hidden[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_404_hidden[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[FileContentsManager--inroot] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[FileContentsManager-Directory with spaces in-inspace] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[FileContentsManager-unicod\xe9-innonascii] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[FileContentsManager-foo-a] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[FileContentsManager-foo-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[FileContentsManager-foo-name with spaces] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[FileContentsManager-foo-unicod\xe9] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[FileContentsManager-foo/bar-baz] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[FileContentsManager-ordering-A] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[FileContentsManager-ordering-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[FileContentsManager-ordering-C] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[FileContentsManager-\xe5 b-\xe7 d] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[AsyncFileContentsManager--inroot] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[AsyncFileContentsManager-Directory with spaces in-inspace] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[AsyncFileContentsManager-unicod\xe9-innonascii] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[AsyncFileContentsManager-foo-a] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[AsyncFileContentsManager-foo-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[AsyncFileContentsManager-foo-name with spaces] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[AsyncFileContentsManager-foo-unicod\xe9] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[AsyncFileContentsManager-foo/bar-baz] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[AsyncFileContentsManager-ordering-A] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[AsyncFileContentsManager-ordering-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[AsyncFileContentsManager-ordering-C] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_binary_file_contents[AsyncFileContentsManager-\xe5 b-\xe7 d] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_bad_type[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_get_bad_type[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_create_untitled[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_create_untitled[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_create_untitled_txt[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_create_untitled_txt[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_upload[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_upload[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_mkdir_untitled[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_mkdir_untitled[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_mkdir[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_mkdir[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_mkdir_hidden_400[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_mkdir_hidden_400[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_upload_txt[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_upload_txt[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_upload_txt_hidden[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_upload_txt_hidden[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_upload_b64[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_upload_b64[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_copy[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_copy[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_copy_dir[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_copy_dir[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_copy_path[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_copy_path[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_copy_put_400[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_copy_put_400[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_copy_put_400_hidden[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_copy_put_400_hidden[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_copy_400_hidden[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_copy_400_hidden[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[FileContentsManager--inroot] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[FileContentsManager-Directory with spaces in-inspace] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[FileContentsManager-unicod\xe9-innonascii] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[FileContentsManager-foo-a] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[FileContentsManager-foo-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[FileContentsManager-foo-name with spaces] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[FileContentsManager-foo-unicod\xe9] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[FileContentsManager-foo/bar-baz] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[FileContentsManager-ordering-A] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[FileContentsManager-ordering-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[FileContentsManager-ordering-C] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[FileContentsManager-\xe5 b-\xe7 d] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager--inroot] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager-Directory with spaces in-inspace] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager-unicod\xe9-innonascii] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager-foo-a] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager-foo-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager-foo-name with spaces] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager-foo-unicod\xe9] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager-foo/bar-baz] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager-ordering-A] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager-ordering-b] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager-ordering-C] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete[AsyncFileContentsManager-\xe5 b-\xe7 d] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete_dirs[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete_dirs[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete_non_empty_dir[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete_non_empty_dir[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete_hidden_dir[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete_hidden_dir[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete_hidden_file[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_delete_hidden_file[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_rename[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_rename[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_rename_400_hidden[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_rename_400_hidden[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_checkpoints_follow_file[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_checkpoints_follow_file[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_rename_existing[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_rename_existing[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_save[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_save[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_checkpoints[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_checkpoints[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_file_checkpoints[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_file_checkpoints[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_trust[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_trust[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_regression_is_hidden[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_api.py::test_regression_is_hidden[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_checkpoints.py::test_checkpoints_follow_file[contents_manager0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_checkpoints.py::test_checkpoints_follow_file[contents_manager1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_checkpoints.py::test_checkpoints_follow_file[contents_manager2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_checkpoints.py::test_checkpoints_follow_file[contents_manager3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_checkpoints.py::test_nb_checkpoints[contents_manager0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_checkpoints.py::test_nb_checkpoints[contents_manager1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_checkpoints.py::test_nb_checkpoints[contents_manager2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_checkpoints.py::test_nb_checkpoints[contents_manager3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_checkpoints.py::test_file_checkpoints[contents_manager0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_checkpoints.py::test_file_checkpoints[contents_manager1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_checkpoints.py::test_file_checkpoints[contents_manager2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_checkpoints.py::test_file_checkpoints[contents_manager3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_config.py::test_config_did_something[AsyncGenericFileCheckpoints] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_config.py::test_config_did_something[AsyncFileCheckpoints] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_config.py::test_pre_post_save_hook_config[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/contents/test_manager_no_hash.py::test_manager_no_hash_support - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/events/test_api.py::test_subscribe_websocket - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/events/test_api.py::test_post_event[{\n "schema_id": "http://event.mock.jupyter.org/message",\n "version": 1,\n "data": {\n "event_message": "Hello, world!"\n },\n "timestamp": "2022-05-26T12:50:00+06:00Z"\n}\n] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/events/test_api.py::test_post_event[{\n "schema_id": "http://event.mock.jupyter.org/message",\n "version": 1,\n "data": {\n "event_message": "Hello, world!"\n }\n}\n] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/events/test_api.py::test_post_event_400[{\n "schema_id": "http://event.mock.jupyter.org/message",\n "data": {\n "event_message": "Hello, world!"\n }\n}\n] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/events/test_api.py::test_post_event_400[{\n "version": 1,\n "data": {\n "event_message": "Hello, world!"\n }\n}\n] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/events/test_api.py::test_post_event_400[{\n "schema_id": "http://event.mock.jupyter.org/message",\n "version": 1\n}\n] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/events/test_api.py::test_post_event_400[{\n "schema_id": "event.mock.jupyter.org/message",\n "version": 1,\n "data": {\n "event_message": "Hello, world!"\n },\n "timestamp": "2022-05-26 12:50:00"\n}\n] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/events/test_api.py::test_post_event_500[{\n "schema_id": "http://event.mock.jupyter.org/message",\n "version": 1,\n "data": {\n "message": "Hello, world!"\n }\n}\n] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/events/test_api.py::test_post_event_500[{\n "schema_id": "http://event.mock.jupyter.org/message",\n "version": 2,\n "data": {\n "message": "Hello, world!"\n }\n}\n] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/events/test_extension.py::test_subscribe_websocket - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_api.py::test_no_kernels[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_api.py::test_no_kernels[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_api.py::test_no_kernels[jp_server_config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_api.py::test_default_kernels[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_api.py::test_default_kernels[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_api.py::test_default_kernels[jp_server_config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_api.py::test_main_kernel_handler[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_api.py::test_main_kernel_handler[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_api.py::test_main_kernel_handler[jp_server_config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_api.py::test_kernel_handler[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_api.py::test_kernel_handler[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_api.py::test_kernel_handler[jp_server_config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_api.py::test_kernel_handler_startup_error[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_api.py::test_kernel_handler_startup_error[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_api.py::test_kernel_handler_startup_error[jp_server_config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_api.py::test_kernel_handler_startup_error_pending[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_api.py::test_kernel_handler_startup_error_pending[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_api.py::test_kernel_handler_startup_error_pending[jp_server_config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_api.py::test_connection[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_api.py::test_connection[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_api.py::test_connection[jp_server_config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_config.py::test_config - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_connection.py::test_websocket_connection - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_cull.py::test_cull_idle[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_cull.py::test_cull_idle[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_cull.py::test_cull_idle_disable - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernels/test_cull.py::test_cull_dead[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernelspecs/test_api.py::test_list_kernelspecs_bad - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernelspecs/test_api.py::test_list_kernelspecs - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernelspecs/test_api.py::test_get_kernelspecs - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernelspecs/test_api.py::test_get_nonexistant_kernelspec - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernelspecs/test_api.py::test_get_kernel_resource_file - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/kernelspecs/test_api.py::test_get_nonexistant_resource - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/nbconvert/test_api.py::test_list_formats - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create[jp_server_config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create[jp_server_config3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_bad[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_bad[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_bad[jp_server_config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_bad[jp_server_config3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_bad_pending[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_bad_pending[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_bad_pending[jp_server_config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_bad_pending[jp_server_config3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_file_session[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_file_session[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_file_session[jp_server_config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_file_session[jp_server_config3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_console_session[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_console_session[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_console_session[jp_server_config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_console_session[jp_server_config3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_deprecated[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_deprecated[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_deprecated[jp_server_config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_deprecated[jp_server_config3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_with_kernel_id[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_with_kernel_id[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_with_kernel_id[jp_server_config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_with_kernel_id[jp_server_config3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_with_bad_kernel_id[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_with_bad_kernel_id[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_with_bad_kernel_id[jp_server_config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_create_with_bad_kernel_id[jp_server_config3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_delete[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_delete[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_delete[jp_server_config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_delete[jp_server_config3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_modify_path[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_modify_path[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_modify_path[jp_server_config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_modify_path[jp_server_config3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_modify_path_deprecated[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_modify_path_deprecated[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_modify_path_deprecated[jp_server_config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_modify_path_deprecated[jp_server_config3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_modify_type[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_modify_type[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_modify_type[jp_server_config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_modify_type[jp_server_config3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_modify_kernel_name[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_modify_kernel_name[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_modify_kernel_name[jp_server_config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_modify_kernel_name[jp_server_config3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_modify_kernel_id[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_modify_kernel_id[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_modify_kernel_id[jp_server_config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_modify_kernel_id[jp_server_config3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_restart_kernel[jp_server_config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_restart_kernel[jp_server_config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_restart_kernel[jp_server_config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/services/sessions/test_api.py::test_restart_kernel[jp_server_config3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_files.py::test_file_types[jupyter_server.files.handlers.FilesHandler] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_files.py::test_file_types[jupyter_server.base.handlers.AuthenticatedFileHandler] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_files.py::test_hidden_files[maybe_hidden0-jupyter_server.files.handlers.FilesHandler] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_files.py::test_hidden_files[maybe_hidden0-jupyter_server.base.handlers.AuthenticatedFileHandler] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_files.py::test_hidden_files[maybe_hidden1-jupyter_server.files.handlers.FilesHandler] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_files.py::test_hidden_files[maybe_hidden1-jupyter_server.base.handlers.AuthenticatedFileHandler] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_files.py::test_hidden_files[maybe_hidden2-jupyter_server.files.handlers.FilesHandler] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_files.py::test_hidden_files[maybe_hidden2-jupyter_server.base.handlers.AuthenticatedFileHandler] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_files.py::test_hidden_files[maybe_hidden3-jupyter_server.files.handlers.FilesHandler] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_files.py::test_hidden_files[maybe_hidden3-jupyter_server.base.handlers.AuthenticatedFileHandler] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_files.py::test_regression_is_hidden[jupyter_server.files.handlers.FilesHandler] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_files.py::test_regression_is_hidden[jupyter_server.base.handlers.AuthenticatedFileHandler] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_files.py::test_contents_manager[jupyter_server.files.handlers.FilesHandler] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_files.py::test_contents_manager[jupyter_server.base.handlers.AuthenticatedFileHandler] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_files.py::test_save_hooks[jupyter_server.files.handlers.FilesHandler] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_files.py::test_save_hooks[jupyter_server.base.handlers.AuthenticatedFileHandler] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_files.py::test_download[jupyter_server.files.handlers.FilesHandler] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_files.py::test_download[jupyter_server.base.handlers.AuthenticatedFileHandler] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_files.py::test_old_files_redirect[jupyter_server.files.handlers.FilesHandler] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_files.py::test_old_files_redirect[jupyter_server.base.handlers.AuthenticatedFileHandler] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_gateway.py::test_gateway_env_options - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_gateway.py::test_gateway_class_mappings - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_gateway.py::test_gateway_get_kernelspecs - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_gateway.py::test_gateway_get_named_kernelspec - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_gateway.py::test_gateway_session_lifecycle[False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_gateway.py::test_gateway_session_lifecycle[True] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_gateway.py::test_gateway_kernel_lifecycle[False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_gateway.py::test_gateway_kernel_lifecycle[True] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_gateway.py::test_gateway_shutdown[True] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_gateway.py::test_gateway_shutdown[False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_gateway.py::test_kernel_client_response_router_notifies_channel_queue_when_finished - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_gateway.py::test_websocket_connection_closed - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_gateway.py::test_websocket_connection_with_session_id - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_paths.py::test_trailing_slash[/notebooks/mynotebook/-/notebooks/mynotebook] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_paths.py::test_trailing_slash[////foo///-/foo] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_paths.py::test_trailing_slash[//example.com/-/example.com] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_paths.py::test_trailing_slash[/has/param/?hasparam=true-/has/param?hasparam=true] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_serverapp.py::test_list_running_servers - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_serverapp.py::test_server_web_application - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_serverapp.py::test_misc - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_serverapp.py::test_deprecated_props - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_serverapp.py::test_signals - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_serverapp.py::test_shutdown_no_activity - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_serverapp.py::test_running_server_info - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_terminal.py::test_no_terminals - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_terminal.py::test_terminal_create - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_terminal.py::test_terminal_create_with_kwargs - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_terminal.py::test_terminal_create_with_cwd - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_terminal.py::test_culling - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_view.py::test_view[False-nosuchfile.html] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_view.py::test_view[False-nosuchfile.bin] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_view.py::test_view[True-exists.html] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/test_view.py::test_view[True-exists.bin] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/unix_sockets/test_api.py::test_get_spec - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 ERROR tests/unix_sockets/test_api.py::test_list_running_servers - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/auth/test_legacy_login.py::test_deprecated_config - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/auth/test_legacy_login.py::test_deprecated_config_priority - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/extension/test_app.py::test_browser_open[True-config0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/extension/test_app.py::test_browser_open[True-config1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/extension/test_app.py::test_browser_open[False-config2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/extension/test_app.py::test_browser_open[True-config3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/extension/test_app.py::test_browser_open[False-config4] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/extension/test_app.py::test_browser_open[True-config5] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/extension/test_app.py::test_browser_open[False-config6] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/extension/test_app.py::test_browser_open[True-config7] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/extension/test_app.py::test_browser_open[False-config8] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/extension/test_app.py::test_load_parallel_extensions - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/extension/test_handler.py::test_serverapp_warns_of_unauthenticated_handler - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/extension/test_serverextension.py::test_merge_config - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_config.py::test_async_contents_manager[AsyncGenericFileCheckpoints] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_config.py::test_async_contents_manager[AsyncFileCheckpoints] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_largefilemanager.py::test_save[LargeFileManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_largefilemanager.py::test_save[AsyncLargeFileManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_largefilemanager.py::test_saving_different_chunks[LargeFileManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_largefilemanager.py::test_saving_different_chunks[AsyncLargeFileManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_largefilemanager.py::test_save_in_subdirectory[LargeFileManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_largefilemanager.py::test_save_in_subdirectory[AsyncLargeFileManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_bad_symlink[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_bad_symlink[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_recursive_symlink[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_recursive_symlink[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_good_symlink[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_good_symlink[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_403[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_403[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_404[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_404[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_new_untitled[jp_contents_manager0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_new_untitled[jp_contents_manager1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_new_untitled[jp_contents_manager2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_new_untitled[jp_contents_manager3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_modified_date[jp_contents_manager0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_modified_date[jp_contents_manager1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_modified_date[jp_contents_manager2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_modified_date[jp_contents_manager3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_get[jp_contents_manager0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_get[jp_contents_manager1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_get[jp_contents_manager2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_get[jp_contents_manager3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_update[jp_contents_manager0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_update[jp_contents_manager1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_update[jp_contents_manager2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_update[jp_contents_manager3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_save[jp_contents_manager0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_save[jp_contents_manager1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_save[jp_contents_manager2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_save[jp_contents_manager3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_delete[jp_contents_manager0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_delete[jp_contents_manager1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_delete[jp_contents_manager2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_delete[jp_contents_manager3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager0-True-True-False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager0-True-False-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager0-False-True-False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager0-False-False-True] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager1-True-True-False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager1-True-False-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager1-False-True-False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager1-False-False-True] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager2-True-True-False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager2-True-False-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager2-False-True-False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager2-False-False-True] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager3-True-True-False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager3-True-False-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager3-False-True-False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_delete_non_empty_folder[jp_contents_manager3-False-False-True] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_rename[jp_contents_manager0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_rename[jp_contents_manager1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_rename[jp_contents_manager2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_rename[jp_contents_manager3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_copy[jp_contents_manager0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_copy[jp_contents_manager1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_copy[jp_contents_manager2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_copy[jp_contents_manager3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_copy_dir[jp_contents_manager0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_copy_dir[jp_contents_manager1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_copy_dir[jp_contents_manager2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_copy_dir[jp_contents_manager3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_copy_big_dir[jp_contents_manager0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_copy_big_dir[jp_contents_manager1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_copy_big_dir[jp_contents_manager2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_copy_big_dir[jp_contents_manager3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_mark_trusted_cells[jp_contents_manager0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_mark_trusted_cells[jp_contents_manager1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_mark_trusted_cells[jp_contents_manager2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_mark_trusted_cells[jp_contents_manager3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_check_and_sign[jp_contents_manager0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_check_and_sign[jp_contents_manager1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_check_and_sign[jp_contents_manager2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_check_and_sign[jp_contents_manager3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_nb_validation[jp_contents_manager0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_nb_validation[jp_contents_manager1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_nb_validation[jp_contents_manager2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_nb_validation[jp_contents_manager3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_validate_notebook_model[jp_contents_manager0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_validate_notebook_model[jp_contents_manager1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_validate_notebook_model[jp_contents_manager2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_validate_notebook_model[jp_contents_manager3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_regression_is_hidden[jp_contents_manager0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_regression_is_hidden[jp_contents_manager1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_regression_is_hidden[jp_contents_manager2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/contents/test_manager.py::test_regression_is_hidden[jp_contents_manager3] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/kernels/test_config.py::test_async_kernel_manager - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/kernels/test_config.py::test_not_server_kernel_manager - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/services/kernels/test_events.py::test_kernel_action_success_event[start] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 FAILED tests/services/kernels/test_events.py::test_kernel_action_success_event[restart] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 FAILED tests/services/kernels/test_events.py::test_kernel_action_success_event[interrupt] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 FAILED tests/services/kernels/test_events.py::test_kernel_action_success_event[shutdown] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 FAILED tests/services/kernels/test_events.py::test_kernel_action_failed_event[start] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 FAILED tests/services/kernels/test_events.py::test_kernel_action_failed_event[restart] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 FAILED tests/services/kernels/test_events.py::test_kernel_action_failed_event[interrupt] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 FAILED tests/services/kernels/test_events.py::test_kernel_action_failed_event[shutdown] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 FAILED tests/services/kernels/test_events.py::test_kernel_action_http_error_event[start] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 FAILED tests/services/kernels/test_events.py::test_kernel_action_http_error_event[restart] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 FAILED tests/services/kernels/test_events.py::test_kernel_action_http_error_event[interrupt] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 FAILED tests/services/kernels/test_events.py::test_kernel_action_http_error_event[shutdown] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/kernel_actions/v1 FAILED tests/test_gateway.py::test_gateway_cli_options - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_gateway.py::test_token_renewer_config[default-] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_gateway.py::test_token_renewer_config[custom-None] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_gateway.py::test_token_renewer_config[custom-] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_gateway.py::test_gateway_request_timeout_pad_option[50-10-50-45] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_gateway.py::test_gateway_request_timeout_pad_option[10-50-55-50] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_gateway.py::test_gateway_request_with_expiring_cookies[False-None-None-EXISTING=1-False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_gateway.py::test_gateway_request_with_expiring_cookies[True-None-None-EXISTING=1-True] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_gateway.py::test_gateway_request_with_expiring_cookies[True-Expires-180-None-True] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_gateway.py::test_gateway_request_with_expiring_cookies[True-Max-Age--360-EXISTING=1-False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_server_list[json] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_server_list[jsonlist] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_server_list[] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_server_info_file - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_root_dir - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_invalid_root_dir[invalid_root_dir0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_invalid_root_dir[invalid_root_dir1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_invalid_root_dir[invalid_root_dir2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_valid_root_dir[valid_root_dir0] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_valid_root_dir[valid_root_dir1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_valid_root_dir[valid_root_dir2] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_generate_config - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_server_password - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_allow_unauthenticated_env_var[yes-True] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_allow_unauthenticated_env_var[Yes-True] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_allow_unauthenticated_env_var[True-True] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_allow_unauthenticated_env_var[true-True] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_allow_unauthenticated_env_var[TRUE-True] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_allow_unauthenticated_env_var[no-False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_allow_unauthenticated_env_var[nooo-False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_allow_unauthenticated_env_var[FALSE-False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_allow_unauthenticated_env_var[false-False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_valid_preferred_dir - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_valid_preferred_dir_is_root_subdir - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_preferred_dir_validation_sync_regression[FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_preferred_dir_validation_sync_regression[AsyncFileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_preferred_dir_validation[cli-cli-ServerApp] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_preferred_dir_validation[cli-cli-FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_preferred_dir_validation[cli-config-ServerApp] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_preferred_dir_validation[cli-config-FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_preferred_dir_validation[cli-default-ServerApp] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_preferred_dir_validation[cli-default-FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_preferred_dir_validation[config-cli-ServerApp] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_preferred_dir_validation[config-cli-FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_preferred_dir_validation[config-config-ServerApp] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_preferred_dir_validation[config-config-FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_preferred_dir_validation[config-default-ServerApp] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_preferred_dir_validation[config-default-FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_preferred_dir_validation[default-cli-ServerApp] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_preferred_dir_validation[default-cli-FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_preferred_dir_validation[default-config-ServerApp] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_preferred_dir_validation[default-config-FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_preferred_dir_validation[default-default-ServerApp] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_preferred_dir_validation[default-default-FileContentsManager] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_invalid_preferred_dir_does_not_exist_set - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_invalid_preferred_dir_not_root_subdir - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_invalid_preferred_dir_not_root_subdir_set - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_absolute_preferred_dir_not_root_subdir_set - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_browser_open_files[True] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_browser_open_files[False] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_serverapp.py::test_deprecated_notebook_dir_priority - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_terminal.py::test_culling_config - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_terminal.py::test_shell_command_override[shell_command="['/path/to/shell', '-l']"-expected_shell0-5.4] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 FAILED tests/test_terminal.py::test_shell_command_override[shell_command="/string/path/to/shell -l"-expected_shell1-5.1] - jupyter_events.utils.JupyterEventsVersionWarning: The `version` property of an event schema must be a string. It has been type coerced, but in a future version of this library, it will fail to validate. Please update schema: https://events.jupyter.org/jupyter_server/contents_service/v1 = 186 failed, 197 passed, 15 skipped, 2 warnings, 603 errors in 117.39s (0:01:57) = error: Bad exit status from /var/tmp/rpm-tmp.hQsJbw (%check) Bad exit status from /var/tmp/rpm-tmp.hQsJbw (%check) RPM build errors: Finish: rpmbuild python-jupyter-server-2.14.2-2.fc42.src.rpm Finish: build phase for python-jupyter-server-2.14.2-2.fc42.src.rpm INFO: chroot_scan: 1 files copied to /var/lib/copr-rpmbuild/results/chroot_scan INFO: /var/lib/mock/fedora-rawhide-x86_64-1734518440.388095/root/var/log/dnf5.log INFO: chroot_scan: creating tarball /var/lib/copr-rpmbuild/results/chroot_scan.tar.gz /bin/tar: Removing leading `/' from member names ERROR: Exception(/var/lib/copr-rpmbuild/results/python-jupyter-server-2.14.2-2.fc42.src.rpm) Config(fedora-rawhide-x86_64) 2 minutes 16 seconds INFO: Results and/or logs in: /var/lib/copr-rpmbuild/results INFO: Cleaning up build root ('cleanup_on_failure=True') Start: clean chroot INFO: unmounting tmpfs. Finish: clean chroot ERROR: Command failed: # /usr/bin/systemd-nspawn -q -M 1e36dfa4ed554c0dab35900325cb1fb6 -D /var/lib/mock/fedora-rawhide-x86_64-1734518440.388095/root -a -u mockbuild --capability=cap_ipc_lock --rlimit=RLIMIT_NOFILE=10240 --capability=cap_ipc_lock --bind=/tmp/mock-resolv.9jfa6bgg:/etc/resolv.conf --bind=/dev/btrfs-control --bind=/dev/mapper/control --bind=/dev/fuse --bind=/dev/loop-control --bind=/dev/loop0 --bind=/dev/loop1 --bind=/dev/loop2 --bind=/dev/loop3 --bind=/dev/loop4 --bind=/dev/loop5 --bind=/dev/loop6 --bind=/dev/loop7 --bind=/dev/loop8 --bind=/dev/loop9 --bind=/dev/loop10 --bind=/dev/loop11 --console=pipe --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin '--setenv=PROMPT_COMMAND=printf "\033]0;\007"' '--setenv=PS1= \s-\v\$ ' --setenv=LANG=C.UTF-8 --resolv-conf=off bash --login -c '/usr/bin/rpmbuild -ba --noprep --target x86_64 /builddir/build/originals/python-jupyter-server.spec' Copr build error: Build failed